Bind the texture also in the global context and some opengl<->x
synchronizing. svn path=/branches/work/kwin_composite/; revision=603127
This commit is contained in:
parent
5245ef9e10
commit
f631e57a01
1 changed files with 4 additions and 1 deletions
|
@ -497,8 +497,9 @@ void SceneOpenGL::Window::bindTexture()
|
||||||
XFillRectangle( display(), pix, gc, 0, th, c->width(), c->height() - th );
|
XFillRectangle( display(), pix, gc, 0, th, c->width(), c->height() - th );
|
||||||
XFillRectangle( display(), pix, gc, tw, 0, c->width() - tw, c->height());
|
XFillRectangle( display(), pix, gc, tw, 0, c->width() - tw, c->height());
|
||||||
XFreeGC( display(), gc );
|
XFreeGC( display(), gc );
|
||||||
glXWaitX();
|
|
||||||
}
|
}
|
||||||
|
if( copy_buffer || alpha_clear )
|
||||||
|
glXWaitX();
|
||||||
if( tfp_mode )
|
if( tfp_mode )
|
||||||
{ // tfp mode, simply bind the pixmap to texture
|
{ // tfp mode, simply bind the pixmap to texture
|
||||||
if( texture == None )
|
if( texture == None )
|
||||||
|
@ -557,11 +558,13 @@ void SceneOpenGL::Window::bindTexture()
|
||||||
// the pixmap is no longer needed, the texture will be updated
|
// the pixmap is no longer needed, the texture will be updated
|
||||||
// only when the window changes anyway, so no need to cache
|
// only when the window changes anyway, so no need to cache
|
||||||
// the pixmap
|
// the pixmap
|
||||||
|
glXWaitGL();
|
||||||
glXDestroyPixmap( display(), pixmap );
|
glXDestroyPixmap( display(), pixmap );
|
||||||
XFreePixmap( display(), pix );
|
XFreePixmap( display(), pix );
|
||||||
if( root_db )
|
if( root_db )
|
||||||
glDrawBuffer( GL_BACK );
|
glDrawBuffer( GL_BACK );
|
||||||
glXMakeContextCurrent( display(), glxroot, glxroot, ctxroot );
|
glXMakeContextCurrent( display(), glxroot, glxroot, ctxroot );
|
||||||
|
glBindTexture( GL_TEXTURE_RECTANGLE_ARB, texture );
|
||||||
}
|
}
|
||||||
if( copy_buffer )
|
if( copy_buffer )
|
||||||
XFreePixmap( display(), window_pix );
|
XFreePixmap( display(), window_pix );
|
||||||
|
|
Loading…
Reference in a new issue