From 186fded142314240f831b0d60e5eb9e18c6b7f5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= Date: Thu, 16 Nov 2006 21:40:10 +0000 Subject: [PATCH] Use glPush/PopAttrib() instead of glIs*(). svn path=/branches/work/kwin_composite/; revision=605476 --- scene_opengl.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scene_opengl.cpp b/scene_opengl.cpp index 13d1a1764b..2286479c89 100644 --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -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(); }