From 47064e24c97af7f1afdabaf6ba8962bdcdcb0854 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 1 May 2016 12:01:44 +0200 Subject: [PATCH] - only bind the uniform buffer if it is actually going to be used. No need to check if we are use a shader storage buffer. --- src/gl/shaders/gl_shader.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index d41adcbe7..395319734 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -294,7 +294,7 @@ bool FShader::Load(const char * name, const char * vert_prog_lump, const char * modelmatrix_index = glGetUniformLocation(hShader, "ModelMatrix"); texturematrix_index = glGetUniformLocation(hShader, "TextureMatrix"); - if (LM_SOFTWARE != gl.lightmethod) + if (LM_SOFTWARE != gl.lightmethod && !(gl.flags & RFL_SHADER_STORAGE_BUFFER)) { int tempindex = glGetUniformBlockIndex(hShader, "LightBufferUBO"); if (tempindex != -1) glUniformBlockBinding(hShader, tempindex, LIGHTBUF_BINDINGPOINT);