From f631e57a017f4027f19d6daaf02e8271242d80f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Tue, 7 Nov 2006 22:11:53 +0000 Subject: [PATCH] Bind the texture also in the global context and some opengl<->x synchronizing. svn path=/branches/work/kwin_composite/; revision=603127 --- scene_opengl.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index b005d423b7..510fb5144a 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -497,8 +497,9 @@ void SceneOpenGL::Window::bindTexture() XFillRectangle( display(), pix, gc, 0, th, c->width(), c->height() - th ); XFillRectangle( display(), pix, gc, tw, 0, c->width() - tw, c->height()); XFreeGC( display(), gc ); - glXWaitX(); } + if( copy_buffer || alpha_clear ) + glXWaitX(); if( tfp_mode ) { // tfp mode, simply bind the pixmap to texture if( texture == None ) @@ -557,11 +558,13 @@ void SceneOpenGL::Window::bindTexture() // the pixmap is no longer needed, the texture will be updated // only when the window changes anyway, so no need to cache // the pixmap + glXWaitGL(); glXDestroyPixmap( display(), pixmap ); XFreePixmap( display(), pix ); if( root_db ) glDrawBuffer( GL_BACK ); glXMakeContextCurrent( display(), glxroot, glxroot, ctxroot ); + glBindTexture( GL_TEXTURE_RECTANGLE_ARB, texture ); } if( copy_buffer ) XFreePixmap( display(), window_pix );