Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-03-20 10:17:16 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-20 10:25:27 +0300
commit4fa904e91c78148ba39ac40371d7680294e225bf (patch)
treeec6c1c6f6a1263e29900bedc9e876d941cc3febf /source/blender/gpu
parentdb5a82302cb322b24d0e0a315e6af499706e8aca (diff)
Cleanup: use lowercase for dimensions in function names
Most API's already use this convention.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r--source/blender/gpu/GPU_texture.h12
-rw-r--r--source/blender/gpu/intern/gpu_draw.c8
-rw-r--r--source/blender/gpu/intern/gpu_framebuffer.c4
-rw-r--r--source/blender/gpu/intern/gpu_material.c4
-rw-r--r--source/blender/gpu/intern/gpu_texture.c22
-rw-r--r--source/blender/gpu/intern/gpu_viewport.c10
6 files changed, 30 insertions, 30 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h
index 5732bad81a9..e596fe9256e 100644
--- a/source/blender/gpu/GPU_texture.h
+++ b/source/blender/gpu/GPU_texture.h
@@ -153,17 +153,17 @@ GPUTexture *GPU_texture_create_nD(
eGPUTextureFormat tex_format, eGPUDataFormat gpu_data_format, int samples,
const bool can_rescale, char err_out[256]);
-GPUTexture *GPU_texture_create_1D(
+GPUTexture *GPU_texture_create_1d(
int w, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_1D_array(
+GPUTexture *GPU_texture_create_1d_array(
int w, int h, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_2D(
+GPUTexture *GPU_texture_create_2d(
int w, int h, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_2D_multisample(
+GPUTexture *GPU_texture_create_2d_multisample(
int w, int h, eGPUTextureFormat data_type, const float *pixels, int samples, char err_out[256]);
-GPUTexture *GPU_texture_create_2D_array(
+GPUTexture *GPU_texture_create_2d_array(
int w, int h, int d, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
-GPUTexture *GPU_texture_create_3D(
+GPUTexture *GPU_texture_create_3d(
int w, int h, int d, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
GPUTexture *GPU_texture_create_cube(
int w, eGPUTextureFormat data_type, const float *pixels, char err_out[256]);
diff --git a/source/blender/gpu/intern/gpu_draw.c b/source/blender/gpu/intern/gpu_draw.c
index d91ea234931..65c07ea01a8 100644
--- a/source/blender/gpu/intern/gpu_draw.c
+++ b/source/blender/gpu/intern/gpu_draw.c
@@ -855,7 +855,7 @@ static GPUTexture *create_transfer_function(int type, const ColorBand *coba)
break;
}
- GPUTexture *tex = GPU_texture_create_1D(TFUNC_WIDTH, GPU_RGBA8, data, NULL);
+ GPUTexture *tex = GPU_texture_create_1d(TFUNC_WIDTH, GPU_RGBA8, data, NULL);
MEM_freeN(data);
@@ -1067,9 +1067,9 @@ void GPU_create_smoke_velocity(SmokeModifierData *smd)
}
if (!sds->tex_velocity_x) {
- sds->tex_velocity_x = GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_x, NULL);
- sds->tex_velocity_y = GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_y, NULL);
- sds->tex_velocity_z = GPU_texture_create_3D(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_z, NULL);
+ sds->tex_velocity_x = GPU_texture_create_3d(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_x, NULL);
+ sds->tex_velocity_y = GPU_texture_create_3d(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_y, NULL);
+ sds->tex_velocity_z = GPU_texture_create_3d(sds->res[0], sds->res[1], sds->res[2], GPU_R16F, vel_z, NULL);
}
}
#else // WITH_SMOKE
diff --git a/source/blender/gpu/intern/gpu_framebuffer.c b/source/blender/gpu/intern/gpu_framebuffer.c
index 461d74738c5..83acdf6a756 100644
--- a/source/blender/gpu/intern/gpu_framebuffer.c
+++ b/source/blender/gpu/intern/gpu_framebuffer.c
@@ -791,12 +791,12 @@ GPUOffScreen *GPU_offscreen_create(int width, int height, int samples, bool dept
height = max_ii(1, height);
width = max_ii(1, width);
- ofs->color = GPU_texture_create_2D_multisample(
+ ofs->color = GPU_texture_create_2d_multisample(
width, height,
(high_bitdepth) ? GPU_RGBA16F : GPU_RGBA8, NULL, samples, err_out);
if (depth) {
- ofs->depth = GPU_texture_create_2D_multisample(width, height, GPU_DEPTH24_STENCIL8, NULL, samples, err_out);
+ ofs->depth = GPU_texture_create_2d_multisample(width, height, GPU_DEPTH24_STENCIL8, NULL, samples, err_out);
}
if ((depth && !ofs->depth) || !ofs->color) {
diff --git a/source/blender/gpu/intern/gpu_material.c b/source/blender/gpu/intern/gpu_material.c
index 302b3b4ef1c..af8fcf6164e 100644
--- a/source/blender/gpu/intern/gpu_material.c
+++ b/source/blender/gpu/intern/gpu_material.c
@@ -165,7 +165,7 @@ static void gpu_material_ramp_texture_build(GPUMaterial *mat)
GPUColorBandBuilder *builder = mat->coba_builder;
- mat->coba_tex = GPU_texture_create_1D_array(CM_TABLE + 1, builder->current_layer, GPU_RGBA16F,
+ mat->coba_tex = GPU_texture_create_1d_array(CM_TABLE + 1, builder->current_layer, GPU_RGBA16F,
(float *)builder->pixels, NULL);
MEM_freeN(builder);
@@ -539,7 +539,7 @@ struct GPUUniformBuffer *GPU_material_sss_profile_get(GPUMaterial *material, int
GPU_texture_free(material->sss_tex_profile);
}
- material->sss_tex_profile = GPU_texture_create_1D(64, GPU_RGBA16F, translucence_profile, NULL);
+ material->sss_tex_profile = GPU_texture_create_1d(64, GPU_RGBA16F, translucence_profile, NULL);
MEM_freeN(translucence_profile);
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index c950eadad1f..ebb7b4bc0f0 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -439,7 +439,7 @@ static GLenum gpu_get_gl_datatype(eGPUDataFormat format)
}
}
-static float *GPU_texture_3D_rescale(GPUTexture *tex, int w, int h, int d, int channels, const float *fpixels)
+static float *GPU_texture_rescale_3d(GPUTexture *tex, int w, int h, int d, int channels, const float *fpixels)
{
const uint xf = w / tex->w, yf = h / tex->h, zf = d / tex->d;
float *nfpixels = MEM_mallocN(channels * sizeof(float) * tex->w * tex->h * tex->d, "GPUTexture Rescaled 3Dtex");
@@ -575,7 +575,7 @@ static bool gpu_texture_try_alloc(
return false;
case GL_PROXY_TEXTURE_3D:
BLI_assert(data_type == GL_FLOAT);
- *rescaled_fpixels = GPU_texture_3D_rescale(tex, w, h, d, channels, fpixels);
+ *rescaled_fpixels = GPU_texture_rescale_3d(tex, w, h, d, channels, fpixels);
return (bool)*rescaled_fpixels;
}
}
@@ -985,7 +985,7 @@ GPUTexture *GPU_texture_from_preview(PreviewImage *prv, int mipmap)
}
-GPUTexture *GPU_texture_create_1D(
+GPUTexture *GPU_texture_create_1d(
int w, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
{
BLI_assert(w > 0);
@@ -993,7 +993,7 @@ GPUTexture *GPU_texture_create_1D(
return GPU_texture_create_nD(w, 0, 0, 1, pixels, tex_format, data_format, 0, false, err_out);
}
-GPUTexture *GPU_texture_create_1D_array(
+GPUTexture *GPU_texture_create_1d_array(
int w, int h, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
{
BLI_assert(w > 0 && h > 0);
@@ -1001,7 +1001,7 @@ GPUTexture *GPU_texture_create_1D_array(
return GPU_texture_create_nD(w, h, 0, 1, pixels, tex_format, data_format, 0, false, err_out);
}
-GPUTexture *GPU_texture_create_2D(
+GPUTexture *GPU_texture_create_2d(
int w, int h, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
{
BLI_assert(w > 0 && h > 0);
@@ -1009,7 +1009,7 @@ GPUTexture *GPU_texture_create_2D(
return GPU_texture_create_nD(w, h, 0, 2, pixels, tex_format, data_format, 0, false, err_out);
}
-GPUTexture *GPU_texture_create_2D_multisample(
+GPUTexture *GPU_texture_create_2d_multisample(
int w, int h, eGPUTextureFormat tex_format, const float *pixels, int samples, char err_out[256])
{
BLI_assert(w > 0 && h > 0);
@@ -1017,7 +1017,7 @@ GPUTexture *GPU_texture_create_2D_multisample(
return GPU_texture_create_nD(w, h, 0, 2, pixels, tex_format, data_format, samples, false, err_out);
}
-GPUTexture *GPU_texture_create_2D_array(
+GPUTexture *GPU_texture_create_2d_array(
int w, int h, int d, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
{
BLI_assert(w > 0 && h > 0 && d > 0);
@@ -1025,7 +1025,7 @@ GPUTexture *GPU_texture_create_2D_array(
return GPU_texture_create_nD(w, h, d, 2, pixels, tex_format, data_format, 0, false, err_out);
}
-GPUTexture *GPU_texture_create_3D(
+GPUTexture *GPU_texture_create_3d(
int w, int h, int d, eGPUTextureFormat tex_format, const float *pixels, char err_out[256])
{
BLI_assert(w > 0 && h > 0 && d > 0);
@@ -1275,9 +1275,9 @@ void GPU_invalid_tex_init(void)
{
memory_usage = 0;
const float color[4] = {1.0f, 0.0f, 1.0f, 1.0f};
- GG.invalid_tex_1D = GPU_texture_create_1D(1, GPU_RGBA8, color, NULL);
- GG.invalid_tex_2D = GPU_texture_create_2D(1, 1, GPU_RGBA8, color, NULL);
- GG.invalid_tex_3D = GPU_texture_create_3D(1, 1, 1, GPU_RGBA8, color, NULL);
+ GG.invalid_tex_1D = GPU_texture_create_1d(1, GPU_RGBA8, color, NULL);
+ GG.invalid_tex_2D = GPU_texture_create_2d(1, 1, GPU_RGBA8, color, NULL);
+ GG.invalid_tex_3D = GPU_texture_create_3d(1, 1, 1, GPU_RGBA8, color, NULL);
}
void GPU_invalid_tex_bind(int mode)
diff --git a/source/blender/gpu/intern/gpu_viewport.c b/source/blender/gpu/intern/gpu_viewport.c
index 7688b113547..9a39b724b6a 100644
--- a/source/blender/gpu/intern/gpu_viewport.c
+++ b/source/blender/gpu/intern/gpu_viewport.c
@@ -304,7 +304,7 @@ GPUTexture *GPU_viewport_texture_pool_query(GPUViewport *viewport, void *engine,
}
}
- tex = GPU_texture_create_2D(width, height, format, NULL, NULL);
+ tex = GPU_texture_create_2d(width, height, format, NULL, NULL);
GPU_texture_bind(tex, 0);
/* Doing filtering for depth does not make sense when not doing shadow mapping,
* and enabling texture filtering on integer texture make them unreadable. */
@@ -381,8 +381,8 @@ static void gpu_viewport_default_fb_create(GPUViewport *viewport)
int *size = viewport->size;
bool ok = true;
- dtxl->color = GPU_texture_create_2D(size[0], size[1], GPU_RGBA8, NULL, NULL);
- dtxl->depth = GPU_texture_create_2D(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
+ dtxl->color = GPU_texture_create_2d(size[0], size[1], GPU_RGBA8, NULL, NULL);
+ dtxl->depth = GPU_texture_create_2d(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, NULL);
if (!(dtxl->depth && dtxl->color)) {
ok = false;
@@ -426,8 +426,8 @@ static void gpu_viewport_default_multisample_fb_create(GPUViewport *viewport)
int samples = viewport->samples;
bool ok = true;
- dtxl->multisample_color = GPU_texture_create_2D_multisample(size[0], size[1], GPU_RGBA8, NULL, samples, NULL);
- dtxl->multisample_depth = GPU_texture_create_2D_multisample(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, samples, NULL);
+ dtxl->multisample_color = GPU_texture_create_2d_multisample(size[0], size[1], GPU_RGBA8, NULL, samples, NULL);
+ dtxl->multisample_depth = GPU_texture_create_2d_multisample(size[0], size[1], GPU_DEPTH24_STENCIL8, NULL, samples, NULL);
if (!(dtxl->multisample_depth && dtxl->multisample_color)) {
ok = false;