This thing fails when we don't support binding. Not 100% sure why I need to set this multiple times.

This commit is contained in:
Ryan Houdek 2011-12-18 23:31:00 -06:00 committed by Sonicadvance1
parent c76593f6a2
commit 6759ee701d
1 changed files with 7 additions and 0 deletions

View File

@ -77,6 +77,13 @@ namespace OGL
{ {
PCacheEntry &entry = iter->second; PCacheEntry &entry = iter->second;
glUseProgram(entry.program.glprogid); glUseProgram(entry.program.glprogid);
if (!g_ActiveConfig.backend_info.bSupportsGLSLBinding)
for(int a = 0; a < 8; ++a)
{
// Why do we need to set this again here when we don't support binding?
if(entry.program.UniformLocations[a] != -1)
glUniform1i(entry.program.UniformLocations[a], a);
}
CurrentShaderProgram = ShaderPair; CurrentShaderProgram = ShaderPair;
CurrentProgram = entry.program.glprogid; CurrentProgram = entry.program.glprogid;
return; return;