diff --git a/src/gl/shaders/gl_shader.cpp b/src/gl/shaders/gl_shader.cpp index a1a22e770..480d97d25 100644 --- a/src/gl/shaders/gl_shader.cpp +++ b/src/gl/shaders/gl_shader.cpp @@ -299,18 +299,9 @@ FShader *FShaderManager::Compile (const char *ShaderName, const char *ShaderPath void FShader::ApplyMatrices(VSMatrix *proj, VSMatrix *view) { - - if (gl.flags & RFL_SEPARATE_SHADER_OBJECTS) // this check is just for safety. All supported hardware reports this extension as being present. - { - glProgramUniformMatrix4fv(hShader, projectionmatrix_index, 1, false, proj->get()); - glProgramUniformMatrix4fv(hShader, viewmatrix_index, 1, false, view->get()); - } - else - { - Bind(); - glUniformMatrix4fv(projectionmatrix_index, 1, false, proj->get()); - glUniformMatrix4fv(viewmatrix_index, 1, false, view->get()); - } + Bind(); + glUniformMatrix4fv(projectionmatrix_index, 1, false, proj->get()); + glUniformMatrix4fv(viewmatrix_index, 1, false, view->get()); } diff --git a/src/gl/system/gl_interface.cpp b/src/gl/system/gl_interface.cpp index 2f9425fe9..4da1d9a42 100644 --- a/src/gl/system/gl_interface.cpp +++ b/src/gl/system/gl_interface.cpp @@ -131,7 +131,6 @@ void gl_LoadExtensions() if (CheckExtension("GL_ARB_texture_compression")) gl.flags|=RFL_TEXTURE_COMPRESSION; if (CheckExtension("GL_EXT_texture_compression_s3tc")) gl.flags|=RFL_TEXTURE_COMPRESSION_S3TC; if (CheckExtension("GL_ARB_shader_storage_buffer_object")) gl.flags |= RFL_SHADER_STORAGE_BUFFER; - if (CheckExtension("GL_ARB_separate_shader_objects")) gl.flags |= RFL_SEPARATE_SHADER_OBJECTS; glGetIntegerv(GL_MAX_TEXTURE_SIZE,&gl.max_texturesize); glPixelStorei(GL_UNPACK_ALIGNMENT, 1); diff --git a/src/gl/system/gl_interface.h b/src/gl/system/gl_interface.h index fbafc7ca6..5d59e5560 100644 --- a/src/gl/system/gl_interface.h +++ b/src/gl/system/gl_interface.h @@ -9,9 +9,7 @@ enum RenderFlags RFL_TEXTURE_COMPRESSION=1, RFL_TEXTURE_COMPRESSION_S3TC=2, - RFL_SEPARATE_SHADER_OBJECTS = 4, // we need this extension for glProgramUniform. On hardware not supporting it we need some rather clumsy workarounds - RFL_SHADER_STORAGE_BUFFER = 16, // to be used later for a parameter buffer - RFL_BASEINDEX = 32, // currently unused + RFL_SHADER_STORAGE_BUFFER = 4, // to be used later for a parameter buffer }; enum TexMode