Add few missing glBindTexture() calls.

svn path=/trunk/KDE/kdebase/workspace/; revision=726337
This commit is contained in:
Luboš Luňák 2007-10-17 14:54:24 +00:00
parent 3180c8c0b6
commit 6daf4d3ec8

View file

@ -870,7 +870,9 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size,
createTexture(); createTexture();
// when the pixmap is bound to the texture, they share the same data, so the texture // 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 // updates automatically - no need to do anything in such case
if( bound_glxpixmap == None ) if( bound_glxpixmap != None )
glBindTexture( mTarget, mTexture );
else
{ {
int attrs[] = int attrs[] =
{ {
@ -911,11 +913,12 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size,
} }
findTarget(); findTarget();
#ifdef CHECK_GL_ERROR #ifdef CHECK_GL_ERROR
checkGLError( "TextureLoadSHM1" ); checkGLError( "TextureLoadSHM1" );
#endif #endif
if( mTexture == None ) if( mTexture == None )
{ {
createTexture(); createTexture();
glBindTexture( mTarget, mTexture );
y_inverted = false; y_inverted = false;
glTexImage2D( mTarget, 0, depth == 32 ? GL_RGBA : GL_RGB, glTexImage2D( mTarget, 0, depth == 32 ? GL_RGBA : GL_RGB,
mSize.width(), mSize.height(), 0, mSize.width(), mSize.height(), 0,
@ -970,6 +973,7 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size,
if( mTexture == None ) if( mTexture == None )
{ {
createTexture(); createTexture();
glBindTexture( mTarget, mTexture );
y_inverted = false; y_inverted = false;
glCopyTexImage2D( mTarget, 0, glCopyTexImage2D( mTarget, 0,
depth == 32 ? GL_RGBA : GL_RGB, depth == 32 ? GL_RGBA : GL_RGB,