summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-02-05 18:22:23 +0100
committerdegasus <wickmarkus@web.de>2013-02-05 18:22:23 +0100
commitef602fd643ff9eebb86bd03219e44493b0c6441a (patch)
treeebbd1ea789f9c1fc7c8b8c01812934c19472a994 /Source/Plugins/Plugin_VideoOGL
parent76adc77fa6aea54cff18ca5aa3a8f2e5d37594db (diff)
workaround for glGetUniformLocation in efb2ram
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp3
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
index 242663d20c..b56bb8919d 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp
@@ -96,8 +96,9 @@ void ProgramShaderCache::SetProgramVariables(PCacheEntry &entry)
// (Sonicadvance): For some reason this fails on my hardware
//glGetUniformIndices(entry.prog_id, NUM_UNIFORMS, UniformNames, entry.UniformLocations);
// Got to do it this crappy way.
+ entry.UniformLocations[0] = glGetUniformLocation(entry.prog_id, UniformNames[0]);
if (!g_ActiveConfig.backend_info.bSupportsGLSLUBO)
- for (int a = 0; a < NUM_UNIFORMS; ++a)
+ for (int a = 1; a < NUM_UNIFORMS; ++a)
entry.UniformLocations[a] = glGetUniformLocation(entry.prog_id, UniformNames[a]);
// Bind Texture Sampler
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
index 97b53552a9..1dad409a64 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
@@ -355,7 +355,7 @@ int EncodeToRamFromTexture(u32 address,GLuint source_texture, bool bFromZBuffer,
(float)expandedWidth, (float)Renderer::EFBToScaledY(expandedHeight)-1,
(float)Renderer::EFBToScaledX(source.left), (float)Renderer::EFBToScaledY(EFB_HEIGHT - source.top - expandedHeight)
};
- glUniform4fv(glGetUniformLocation(ProgramShaderCache::GetCurrentProgram(), I_COLORS), 2, params);
+ glUniform4fv(ProgramShaderCache::GetShaderProgram().UniformLocations[C_COLORS], 2, params);
TargetRectangle scaledSource;
scaledSource.top = 0;