From 768a683f04cb17b5c668a8b55d7ab084686e845d Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Sun, 18 Dec 2011 23:31:00 -0600 Subject: [PATCH] This thing fails when we don't support binding. Not 100% sure why I need to set this multiple times. --- Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 7ae733bcf1..b83e4cf0ac 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -77,6 +77,13 @@ 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;