Permalink
Browse files

Don't attempt to set the value of u_Lights when using UBOs

  • Loading branch information...
1 parent 355035f commit fda104f8d544e889a7b2c96ce30a9aced14de943 @cmf028 cmf028 committed Mar 11, 2016
Showing with 4 additions and 1 deletion.
  1. +4 −1 daemon/src/engine/renderer/gl_shader.cpp
@@ -2052,7 +2052,10 @@ GLShader_lighttile::GLShader_lighttile( GLShaderManager *manager ) :
void GLShader_lighttile::SetShaderProgramUniforms( shaderProgram_t *shaderProgram )
{
glUniform1i( glGetUniformLocation( shaderProgram->program, "u_DepthMap" ), 0 );
- glUniform1i( glGetUniformLocation( shaderProgram->program, "u_Lights" ), 1 );
+
+ if( !glConfig2.uniformBufferObjectAvailable ) {
+ glUniform1i( glGetUniformLocation( shaderProgram->program, "u_Lights" ), 1 );
+ }
}
GLShader_fxaa::GLShader_fxaa( GLShaderManager *manager ) :

0 comments on commit fda104f

Please sign in to comment.