diff --git a/options.cpp b/options.cpp index 52979e0931..d937ef84d6 100644 --- a/options.cpp +++ b/options.cpp @@ -193,6 +193,7 @@ unsigned long Options::updateSettings() glAlwaysRebind = config.readEntry("GLAlwaysRebind", false ); glDirect = config.readEntry("GLDirect", true ); glVSync = config.readEntry("GLVSync", true ); + glStrictBinding = config.readEntry( "GLStrictBinding", false ); // Read button tooltip animation effect from kdeglobals // Since we want to allow users to enable window decoration tooltips diff --git a/options.h b/options.h index b5686336c8..7ce33fbcb0 100644 --- a/options.h +++ b/options.h @@ -301,6 +301,7 @@ class Options : public KDecorationOptions bool glAlwaysRebind; bool glDirect; bool glVSync; + bool glStrictBinding; private: WindowOperation OpTitlebarDblClick; diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 4772a205a2..05195e4e0b 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -88,7 +88,6 @@ GLXContext SceneOpenGL::ctxdrawable; GLXDrawable SceneOpenGL::glxbuffer = None; GLXDrawable SceneOpenGL::last_pixmap = None; bool SceneOpenGL::tfp_mode; // using glXBindTexImageEXT (texture_from_pixmap) -bool SceneOpenGL::strict_binding; // intended for AIGLX bool SceneOpenGL::db; // destination drawable is double-buffered bool SceneOpenGL::copy_buffer_hack; // workaround for nvidia < 1.0-9xxx drivers bool SceneOpenGL::shm_mode; @@ -113,7 +112,6 @@ SceneOpenGL::SceneOpenGL( Workspace* ws ) kDebug( 1212 ) << "GLX1.3 or GLX_SGIX_fbconfig missing" << endl; return; // error } - strict_binding = false; // not needed now if( !selectMode()) return; // error if( !initBuffer()) // create destination buffer @@ -754,7 +752,7 @@ void SceneOpenGL::Texture::discard() { if( tfp_mode ) { - if( !strict_binding ) + if( !options->glStrictBinding ) glXReleaseTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT ); glXDestroyGLXPixmap( display(), bound_glxpixmap ); bound_glxpixmap = None; @@ -851,7 +849,7 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size, y_inverted = fbcdrawableinfo[ depth ].y_inverted ? true : false; can_use_mipmaps = fbcdrawableinfo[ depth ].mipmap ? true : false; glBindTexture( mTarget, mTexture ); - if( !strict_binding ) + if( !options->glStrictBinding ) glXBindTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT, NULL ); } } @@ -982,7 +980,7 @@ void SceneOpenGL::Texture::bind() { glEnable( mTarget ); glBindTexture( mTarget, mTexture ); - if( tfp_mode && strict_binding ) + if( tfp_mode && options->glStrictBinding ) { assert( bound_glxpixmap != None ); glXBindTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT, NULL ); @@ -992,7 +990,7 @@ void SceneOpenGL::Texture::bind() void SceneOpenGL::Texture::unbind() { - if( tfp_mode && strict_binding ) + if( tfp_mode && options->glStrictBinding ) { assert( bound_glxpixmap != None ); glBindTexture( mTarget, mTexture ); diff --git a/scene_opengl.h b/scene_opengl.h index 0fa407231d..c64ce6978b 100644 --- a/scene_opengl.h +++ b/scene_opengl.h @@ -75,7 +75,6 @@ class SceneOpenGL static GLXDrawable last_pixmap; // for a workaround in bindTexture() static bool tfp_mode; static bool shm_mode; - static bool strict_binding; static bool copy_buffer_hack; QHash< Toplevel*, Window* > windows; #ifdef HAVE_XSHM