diff options
Diffstat (limited to 'source/blender/gpu/opengl/gl_framebuffer.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_framebuffer.cc | 6 |
1 files changed, 3 insertions, 3 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: |