From 1aad2e9e56311607879dc407388c6e1d12cdd978 Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Mon, 19 Dec 2011 00:15:07 -0600 Subject: [PATCH] There we go, actually found the issue. --- .../Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index b83e4cf0ac..d38a4607e4 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -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); }