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:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-02-17 18:38:21 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-02-17 18:38:21 +0300
commit89c79c3ed8d4f8cdf4f78782443bcf218425b412 (patch)
treedefbd5117646c17d8456a30db55d8fedb57998b8 /source/blender/gpu/opengl
parent4430e8a00810ca8df2fa20029c4cb8078e8cdbe6 (diff)
Cleanup: Abbreviate enums with 'UNSIGNED_' in the name
Diffstat (limited to 'source/blender/gpu/opengl')
-rw-r--r--source/blender/gpu/opengl/gl_framebuffer.cc6
-rw-r--r--source/blender/gpu/opengl/gl_texture.hh6
2 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc
index aea19295311..920dac407d7 100644
--- a/source/blender/gpu/opengl/gl_framebuffer.cc
+++ b/source/blender/gpu/opengl/gl_framebuffer.cc
@@ -365,7 +365,7 @@ void GLFrameBuffer::clear_attachment(GPUAttachmentType type,
context_->state_manager->apply_state();
if (type == GPU_FB_DEPTH_STENCIL_ATTACHMENT) {
- BLI_assert(data_format == GPU_DATA_UNSIGNED_INT_24_8);
+ BLI_assert(data_format == GPU_DATA_UINT_24_8);
float depth = ((*(uint32_t *)clear_value) & 0x00FFFFFFu) / (float)0x00FFFFFFu;
int stencil = ((*(uint32_t *)clear_value) >> 24);
glClearBufferfi(GL_DEPTH_STENCIL, 0, depth, stencil);
@@ -374,7 +374,7 @@ void GLFrameBuffer::clear_attachment(GPUAttachmentType type,
if (data_format == GPU_DATA_FLOAT) {
glClearBufferfv(GL_DEPTH, 0, (GLfloat *)clear_value);
}
- else if (data_format == GPU_DATA_UNSIGNED_INT) {
+ else if (data_format == GPU_DATA_UINT) {
float depth = *(uint32_t *)clear_value / (float)0xFFFFFFFFu;
glClearBufferfv(GL_DEPTH, 0, &depth);
}
@@ -388,7 +388,7 @@ void GLFrameBuffer::clear_attachment(GPUAttachmentType type,
case GPU_DATA_FLOAT:
glClearBufferfv(GL_COLOR, slot, (GLfloat *)clear_value);
break;
- case GPU_DATA_UNSIGNED_INT:
+ case GPU_DATA_UINT:
glClearBufferuiv(GL_COLOR, slot, (GLuint *)clear_value);
break;
case GPU_DATA_INT:
diff --git a/source/blender/gpu/opengl/gl_texture.hh b/source/blender/gpu/opengl/gl_texture.hh
index 65a211e12a3..afe0e0195ce 100644
--- a/source/blender/gpu/opengl/gl_texture.hh
+++ b/source/blender/gpu/opengl/gl_texture.hh
@@ -274,11 +274,11 @@ inline GLenum to_gl(eGPUDataFormat format)
return GL_FLOAT;
case GPU_DATA_INT:
return GL_INT;
- case GPU_DATA_UNSIGNED_INT:
+ case GPU_DATA_UINT:
return GL_UNSIGNED_INT;
- case GPU_DATA_UNSIGNED_BYTE:
+ case GPU_DATA_UBYTE:
return GL_UNSIGNED_BYTE;
- case GPU_DATA_UNSIGNED_INT_24_8:
+ case GPU_DATA_UINT_24_8:
return GL_UNSIGNED_INT_24_8;
case GPU_DATA_10_11_11_REV:
return GL_UNSIGNED_INT_10F_11F_11F_REV;