From 6daf4d3ec86e33d797dba5f996cc2718b2b8694a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Wed, 17 Oct 2007 14:54:24 +0000 Subject: [PATCH] Add few missing glBindTexture() calls. svn path=/trunk/KDE/kdebase/workspace/; revision=726337 --- scene_opengl.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index fcbc37eb67..f2d3d28c60 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -870,7 +870,9 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size, createTexture(); // when the pixmap is bound to the texture, they share the same data, so the texture // updates automatically - no need to do anything in such case - if( bound_glxpixmap == None ) + if( bound_glxpixmap != None ) + glBindTexture( mTarget, mTexture ); + else { int attrs[] = { @@ -911,11 +913,12 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size, } findTarget(); #ifdef CHECK_GL_ERROR - checkGLError( "TextureLoadSHM1" ); + checkGLError( "TextureLoadSHM1" ); #endif if( mTexture == None ) { createTexture(); + glBindTexture( mTarget, mTexture ); y_inverted = false; glTexImage2D( mTarget, 0, depth == 32 ? GL_RGBA : GL_RGB, mSize.width(), mSize.height(), 0, @@ -970,6 +973,7 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size, if( mTexture == None ) { createTexture(); + glBindTexture( mTarget, mTexture ); y_inverted = false; glCopyTexImage2D( mTarget, 0, depth == 32 ? GL_RGBA : GL_RGB,