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:
authorClément Foucault <foucault.clem@gmail.com>2020-09-09 01:23:48 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-09 01:28:19 +0300
commitf7fab77f85734e49414ea7d063532dbac6c5b6da (patch)
tree0b43450ad7bb210f0a07b1446228df3d956cab6f /source/blender/gpu/opengl/gl_uniform_buffer.cc
parent25380802d702e65bc232efb5cd7768d6ace165d4 (diff)
Cleanup: GPU: Replace multiple checks by GLContext::debug_layer_support
Diffstat (limited to 'source/blender/gpu/opengl/gl_uniform_buffer.cc')
-rw-r--r--source/blender/gpu/opengl/gl_uniform_buffer.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/gpu/opengl/gl_uniform_buffer.cc b/source/blender/gpu/opengl/gl_uniform_buffer.cc
index 62c590d289f..74453a08bfe 100644
--- a/source/blender/gpu/opengl/gl_uniform_buffer.cc
+++ b/source/blender/gpu/opengl/gl_uniform_buffer.cc
@@ -62,13 +62,11 @@ void GLUniformBuf::init(void)
glBindBuffer(GL_UNIFORM_BUFFER, ubo_id_);
glBufferData(GL_UNIFORM_BUFFER, size_in_bytes_, NULL, GL_DYNAMIC_DRAW);
-#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, "UBO-%s", name_);
glObjectLabel(GL_BUFFER, ubo_id_, -1, sh_name);
}
-#endif
}
void GLUniformBuf::update(const void *data)