summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2012-12-28 16:05:14 +0100
committerdegasus <wickmarkus@web.de>2012-12-28 16:05:14 +0100
commit48ede4dd308d6c747bab119e2db5a313e76dfde1 (patch)
treec9ec61be79783866420afc7ec1fc42578562fc70 /Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
parent70c63ce6cfc566877ff3ade5906184fce879ef91 (diff)
switch to glsl 130, more than OpenGL 3.1 isn't needed
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
index 7e843796db..129d3060b4 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
@@ -73,6 +73,7 @@ void PixelShaderCache::Init()
sprintf(pmatrixprog, "#version %s\n"
"#extension GL_ARB_texture_rectangle : enable\n"
"%s\n"
+ "%s\n"
"%suniform sampler2DRect samp0;\n"
"%s\n"
"%svec4 " I_COLORS"[7];\n"
@@ -91,8 +92,9 @@ void PixelShaderCache::Init()
"Temp1.w = dot(Temp0, " I_COLORS"[%d]);\n"
"gl_FragData[0] = Temp1 + " I_COLORS"[%d];\n"
"}\n",
- (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "330 compatibility" : "120",
+ (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "130" : "120",
g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "#extension GL_ARB_shading_language_420pack : enable" : "",
+ g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "#extension GL_ARB_uniform_buffer_object : enable" : "",
g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "layout(binding = 0) " : "",
g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "layout(std140) uniform PSBlock {" : "",
g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "" : "uniform ",
@@ -109,6 +111,7 @@ void PixelShaderCache::Init()
sprintf(pmatrixprog, "#version %s\n"
"#extension GL_ARB_texture_rectangle : enable\n"
"%s\n"
+ "%s\n"
"%suniform sampler2DRect samp0;\n"
"%s\n"
"%svec4 " I_COLORS"[5];\n"
@@ -137,8 +140,9 @@ void PixelShaderCache::Init()
"R1.w = dot(R0, " I_COLORS"[%d]);\n"
"gl_FragData[0] = R1 * " I_COLORS"[%d];\n"
"}\n",
- (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "330 compatibility" : "120",
+ (g_ActiveConfig.backend_info.bSupportsGLSLUBO || g_ActiveConfig.backend_info.bSupportsGLSLBinding) ? "130" : "120",
g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "#extension GL_ARB_shading_language_420pack : enable" : "",
+ g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "#extension GL_ARB_uniform_buffer_object : enable" : "",
g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "layout(binding = 0) " : "",
g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "layout(std140) uniform PSBlock {" : "",
g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "" : "uniform ",