diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-09 01:23:48 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-09 01:28:19 +0300 |
commit | f7fab77f85734e49414ea7d063532dbac6c5b6da (patch) | |
tree | 0b43450ad7bb210f0a07b1446228df3d956cab6f /source/blender/gpu/opengl/gl_framebuffer.cc | |
parent | 25380802d702e65bc232efb5cd7768d6ace165d4 (diff) |
Cleanup: GPU: Replace multiple checks by GLContext::debug_layer_support
Diffstat (limited to 'source/blender/gpu/opengl/gl_framebuffer.cc')
-rw-r--r-- | source/blender/gpu/opengl/gl_framebuffer.cc | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/blender/gpu/opengl/gl_framebuffer.cc b/source/blender/gpu/opengl/gl_framebuffer.cc index 14b7d78c2ff..bfc8a2f74eb 100644 --- a/source/blender/gpu/opengl/gl_framebuffer.cc +++ b/source/blender/gpu/opengl/gl_framebuffer.cc @@ -63,13 +63,11 @@ GLFrameBuffer::GLFrameBuffer( viewport_[2] = scissor_[2] = w; viewport_[3] = scissor_[3] = h; -#ifndef __APPLE__ - if (fbo_id_ && (G.debug & G_DEBUG_GPU) && (GLEW_VERSION_4_3 || GLEW_KHR_debug)) { + if (fbo_id_ && GLContext::debug_layer_support) { char sh_name[32]; SNPRINTF(sh_name, "FrameBuffer-%s", name); glObjectLabel(GL_FRAMEBUFFER, fbo_id_, -1, sh_name); } -#endif } GLFrameBuffer::~GLFrameBuffer() @@ -100,15 +98,13 @@ void GLFrameBuffer::init(void) state_manager_ = static_cast<GLStateManager *>(context_->state_manager); glGenFramebuffers(1, &fbo_id_); -#ifndef __APPLE__ - if ((G.debug & G_DEBUG_GPU) && (GLEW_VERSION_4_3 || GLEW_KHR_debug)) { + if (GLContext::debug_layer_support) { char sh_name[64]; SNPRINTF(sh_name, "FrameBuffer-%s", name_); /* Binding before setting the label is needed on some drivers. */ glBindFramebuffer(GL_FRAMEBUFFER, fbo_id_); glObjectLabel(GL_FRAMEBUFFER, fbo_id_, -1, sh_name); } -#endif } /** \} */ |