Use glPush/PopAttrib() instead of glIs*().
svn path=/branches/work/kwin_composite/; revision=605476
This commit is contained in:
parent
43a945cd33
commit
186fded142
1 changed files with 2 additions and 3 deletions
|
@ -793,7 +793,7 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
|
||||||
if(( mask & PAINT_WINDOW_TRANSFORMED ) && ( data.xScale != 1 || data.yScale != 1 ))
|
if(( mask & PAINT_WINDOW_TRANSFORMED ) && ( data.xScale != 1 || data.yScale != 1 ))
|
||||||
glScalef( data.xScale, data.yScale, 1 );
|
glScalef( data.xScale, data.yScale, 1 );
|
||||||
// setup blending of transparent windows
|
// setup blending of transparent windows
|
||||||
bool was_blend = glIsEnabled( GL_BLEND );
|
glPushAttrib( GL_ENABLE_BIT );
|
||||||
if( !opaque )
|
if( !opaque )
|
||||||
{
|
{
|
||||||
glEnable( GL_BLEND );
|
glEnable( GL_BLEND );
|
||||||
|
@ -947,8 +947,7 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
|
||||||
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
|
glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE );
|
||||||
glColor4f( 0, 0, 0, 0 );
|
glColor4f( 0, 0, 0, 0 );
|
||||||
}
|
}
|
||||||
if( !was_blend )
|
glPopAttrib();
|
||||||
glDisable( GL_BLEND );
|
|
||||||
disableTexture();
|
disableTexture();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue