Some shader programs don't come with Vertex shaders attached, don't try to bind a Vertex Uniform block then.

This commit is contained in:
Ryan Houdek 2011-12-17 01:17:11 -06:00
parent b837ae25fc
commit 4342efe712

View file

@ -104,7 +104,8 @@ namespace OGL
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
{
glUniformBlockBinding( entry.program.glprogid, 0, 1 );
glUniformBlockBinding( entry.program.glprogid, 1, 2 );
if(uid.uid.vsid != 0) // Some things have no vertex shader
glUniformBlockBinding( entry.program.glprogid, 1, 2 );
}
// We cache our uniform locations for now