Use glPush/PopAttrib() instead of glIs*().

svn path=/branches/work/kwin_composite/; revision=605476
This commit is contained in:
Luboš Luňák 2006-11-16 21:40:10 +00:00
parent 43a945cd33
commit 186fded142

View file

@ -793,7 +793,7 @@ void SceneOpenGL::Window::performPaint( int mask, QRegion region, WindowPaintDat
if(( mask & PAINT_WINDOW_TRANSFORMED ) && ( data.xScale != 1 || data.yScale != 1 ))
glScalef( data.xScale, data.yScale, 1 );
// setup blending of transparent windows
bool was_blend = glIsEnabled( GL_BLEND );
glPushAttrib( GL_ENABLE_BIT );
if( !opaque )
{
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 );
glColor4f( 0, 0, 0, 0 );
}
if( !was_blend )
glDisable( GL_BLEND );
glPopAttrib();
disableTexture();
}