diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp index 008a4a679e..d25830566e 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.cpp @@ -144,10 +144,8 @@ void ProgramShaderCache::SetBothShaders(GLuint PS, GLuint VS) glAttachShader(entry.program.glprogid, entry.program.psid); -#ifdef GLEW_VERSION_4_0 if (g_ActiveConfig.backend_info.bSupportsGLSLCache) glProgramParameteri(entry.program.glprogid, GL_PROGRAM_BINARY_RETRIEVABLE_HINT, GL_TRUE); -#endif glLinkProgram(entry.program.glprogid); @@ -210,7 +208,6 @@ void ProgramShaderCache::Init(void) glBindBufferRange(GL_UNIFORM_BUFFER, 2, s_ps_vs_ubo, s_vs_data_offset, vs_data_size); } -#ifdef GLEW_VERSION_4_0 // Read our shader cache, only if supported if (g_ActiveConfig.backend_info.bSupportsGLSLCache) { @@ -229,7 +226,6 @@ void ProgramShaderCache::Init(void) ProgramFormat = (GLenum)Formats[0]; delete[] Formats; } -#endif } void ProgramShaderCache::Shutdown(void) diff --git a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h index e34ca1c086..34930ec027 100644 --- a/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h +++ b/Source/Plugins/Plugin_VideoOGL/Src/ProgramShaderCache.h @@ -85,25 +85,17 @@ struct PROGRAMSHADER // TODO at first glance looks bad - malloc/no free/pointer not saved in instance... u8 *Data() { -#ifdef GLEW_VERSION_4_0 glGetProgramiv(glprogid, GL_PROGRAM_BINARY_LENGTH, &binaryLength); u8* binary = (u8*)malloc(binaryLength); glGetProgramBinary(glprogid, binaryLength, NULL, &ProgramFormat, binary); return binary; -#else - return NULL; -#endif } GLint Size() { -#ifdef GLEW_VERSION_4_0 if (!binaryLength) glGetProgramiv(glprogid, GL_PROGRAM_BINARY_LENGTH, &binaryLength); return binaryLength; -#else - return 0; -#endif } }; @@ -137,7 +129,6 @@ class ProgramShaderCache public: void Read(const PROGRAMUID &key, const u8 *value, u32 value_size) { -#ifdef GLEW_VERSION_4_0 PCacheEntry entry; // The two shaders might not even exist anymore @@ -158,7 +149,6 @@ class ProgramShaderCache glUseProgram(entry.program.glprogid); SetProgramVariables(entry, key); } -#endif } };