- 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.

This commit is contained in:
Christoph Oelckers 2016-05-01 12:01:44 +02:00
parent 5ead3503b2
commit 47064e24c9
1 changed files with 1 additions and 1 deletions

View File

@ -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);