There we go, actually found the issue.

This commit is contained in:
Ryan Houdek 2011-12-19 00:15:07 -06:00 committed by Sonicadvance1
parent 6759ee701d
commit 1aad2e9e56
1 changed files with 1 additions and 9 deletions

View File

@ -77,13 +77,6 @@ namespace OGL
{
PCacheEntry &entry = iter->second;
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;
CurrentProgram = entry.program.glprogid;
return;
@ -125,11 +118,10 @@ namespace OGL
if (!g_ActiveConfig.backend_info.bSupportsGLSLUBO)
for(int a = 0; a < NUM_UNIFORMS; ++a)
entry.program.UniformLocations[a] = glGetUniformLocation(entry.program.glprogid, UniformNames[a]);
else if (!g_ActiveConfig.backend_info.bSupportsGLSLBinding)
if (!g_ActiveConfig.backend_info.bSupportsGLSLBinding)
for(int a = 0; a < 8; ++a)
{
// Still need to get sampler locations since we aren't binding them statically in the shaders
entry.program.UniformLocations[a] = glGetUniformLocation(entry.program.glprogid, UniformNames[a]);
if(entry.program.UniformLocations[a] != -1)
glUniform1i(entry.program.UniformLocations[a], a);
}