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();
// 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[] =
{
@ -916,6 +918,7 @@ bool SceneOpenGL::Texture::load( const Pixmap& pix, const QSize& size,
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,