From e6ed00123a2cea8e08efbb4c77998c773595a86a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Sat, 15 Oct 2011 09:47:56 +0200 Subject: [PATCH] Ensure that always one shader is on the ShaderStack with GL2 This brings some consistency with GLES2 where also one shader is always on the stack and allows to use the test whether a shader is bound to see if the GL2 code path is used. This fixes an issue with cover/flip switch which tested for a bound shader before the shader was pushed in multi screen setups. As well it should bring some improvements as the simple screen shader is not unbound and rebound in each rendered frame. BUG: 283609 FIXED-IN: 4.7.3 --- scene_opengl_glx.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scene_opengl_glx.cpp b/scene_opengl_glx.cpp index d28278a39e..aa98a63667 100644 --- a/scene_opengl_glx.cpp +++ b/scene_opengl_glx.cpp @@ -92,6 +92,10 @@ SceneOpenGL::SceneOpenGL(Workspace* ws) if (GLPlatform::instance()->supports(GLSL)) { if (!ShaderManager::instance()->isValid()) { kDebug(1212) << "No Scene Shaders available"; + } else { + // push one shader on the stack so that one is always bound + // consistency with GLES + ShaderManager::instance()->pushShader(ShaderManager::SimpleShader); } }