diff --git a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp index 2eb97db663..e0303d465d 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/GLUtil.cpp @@ -28,6 +28,9 @@ #include "GLUtil.h" +// this should be removed in future, but as long as glsl is unstable, we should really read this messages +#define DEBUG_GLSL + GLWindow GLWin; cInterfaceBase *GLInterface; @@ -70,14 +73,14 @@ GLuint OpenGL_CompileProgram ( const char* vertexShader, const char* fragmentSha GLuint vertexShaderID = glCreateShader(GL_VERTEX_SHADER); GLuint fragmentShaderID = glCreateShader(GL_FRAGMENT_SHADER); GLuint programID = glCreateProgram(); - GLint Result = GL_FALSE; - char stringBuffer[1024]; - GLsizei stringBufferUsage = 0; // compile vertex shader glShaderSource(vertexShaderID, 1, &vertexShader, NULL); glCompileShader(vertexShaderID); #if defined(_DEBUG) || defined(DEBUGFAST) || defined(DEBUG_GLSL) + GLint Result = GL_FALSE; + char stringBuffer[1024]; + GLsizei stringBufferUsage = 0; glGetShaderiv(vertexShaderID, GL_COMPILE_STATUS, &Result); glGetShaderInfoLog(vertexShaderID, 1024, &stringBufferUsage, stringBuffer); if(Result && stringBufferUsage) { diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index e57674a2fd..5936ce36d4 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -107,7 +107,7 @@ void ProgramShaderCache::SetProgramBindings ( ProgramShaderCache::PCacheEntry& e } // Need to set some attribute locations - glBindAttribLocation(entry.prog_id, SHADER_POSITION_ATTRIB, "vposition"); + glBindAttribLocation(entry.prog_id, SHADER_POSITION_ATTRIB, "rawpos"); glBindAttribLocation(entry.prog_id, SHADER_POSMTX_ATTRIB, "fposmtx"); glBindAttribLocation(entry.prog_id, SHADER_TEXTURE0_ATTRIB, "texture0"); glBindAttribLocation(entry.prog_id, SHADER_COLOR0_ATTRIB, "color0"); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp index e0a6ecc341..b6401e42df 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp @@ -131,11 +131,11 @@ const u8 rasters[char_count][char_height] = { static const char *s_vertexShaderSrc = "#version 130\n" "uniform vec2 charSize;\n" - "in vec2 vposition;\n" + "in vec2 rawpos;\n" "in vec2 texture0;\n" "out vec2 uv0;\n" "void main(void) {\n" - " gl_Position = vec4(vposition,0,1);\n" + " gl_Position = vec4(rawpos,0,1);\n" " uv0 = texture0 * charSize;\n" "}\n"; diff --git a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp index 7cc72c34f5..1ff4a7b3d4 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/Render.cpp @@ -397,11 +397,11 @@ Renderer::Renderer() ); VertexShaderCache::CompileVertexShader(s_ShowEFBCopyRegions_VS, "#version 130\n" - "in vec2 vposition;\n" + "in vec2 rawpos;\n" "in vec3 color0;\n" "out vec4 c;\n" "void main(void) {\n" - " gl_Position = vec4(vposition,0,1);\n" + " gl_Position = vec4(rawpos,0,1);\n" " c = vec4(color0, 1.0);\n" "}\n" ); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp index af2cdec285..5c4d7c9c8f 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp @@ -538,13 +538,13 @@ TextureCache::TextureCache() const char *VProgram = "#version 130\n" - "in vec2 vposition;\n" + "in vec2 rawpos;\n" "in vec2 texture0;\n" "out vec2 uv0;\n" "void main()\n" "{\n" " uv0 = texture0;\n" - " gl_Position = vec4(vposition,0,1);\n" + " gl_Position = vec4(rawpos,0,1);\n" "}\n"; if (!VertexShaderCache::CompileVertexShader(s_vProgram, VProgram)) ERROR_LOG(VIDEO, "Failed to create texture converter vertex program."); diff --git a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp index 37af213735..e06f997d91 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp @@ -114,13 +114,13 @@ void CreatePrograms() const char *VProgram = "#version 130\n" - "in vec2 vposition;\n" + "in vec2 rawpos;\n" "in vec2 texture0;\n" "out vec2 uv0;\n" "void main()\n" "{\n" " uv0 = texture0;\n" - " gl_Position = vec4(vposition,0,1);\n" + " gl_Position = vec4(rawpos,0,1);\n" "}\n"; if (!VertexShaderCache::CompileVertexShader(s_vProgram, VProgram)) ERROR_LOG(VIDEO, "Failed to create texture converter vertex program.");