Fix pixmap leak with strict binding.

svn path=/trunk/KDE/kdebase/workspace/; revision=673154
This commit is contained in:
Luboš Luňák 2007-06-09 06:27:22 +00:00
parent 12015361d3
commit dce6be54ca

View file

@ -829,8 +829,9 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size,
{ // tfp mode, simply bind the pixmap to texture { // tfp mode, simply bind the pixmap to texture
if( mTexture == None ) if( mTexture == None )
glGenTextures( 1, &mTexture ); glGenTextures( 1, &mTexture );
if( bound_glxpixmap != None && !strict_binding ) // release old if needed if( bound_glxpixmap != None ) // release old if needed
{ {
if( !strict_binding )
glXReleaseTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT ); glXReleaseTexImageEXT( display(), bound_glxpixmap, GLX_FRONT_LEFT_EXT );
glXDestroyGLXPixmap( display(), bound_glxpixmap ); glXDestroyGLXPixmap( display(), bound_glxpixmap );
} }