Attribute stack not available in ES

This commit is contained in:
Martin Gräßlin 2010-11-20 10:42:45 +01:00
parent 70e167aca7
commit e25f43ceb0

View file

@ -866,7 +866,9 @@ PaintClipper::Iterator::Iterator()
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
if( clip() && effects->compositingType() == OpenGLCompositing )
{
#ifndef KWIN_HAVE_OPENGLES
glPushAttrib( GL_SCISSOR_BIT );
#endif
if( !effects->isRenderTargetBound() )
glEnable( GL_SCISSOR_TEST );
data->rects = paintArea().rects();
@ -888,7 +890,13 @@ PaintClipper::Iterator::~Iterator()
{
#ifdef KWIN_HAVE_OPENGL_COMPOSITING
if( clip() && effects->compositingType() == OpenGLCompositing )
{
if( !effects->isRenderTargetBound() )
glDisable( GL_SCISSOR_TEST );
#ifndef KWIN_HAVE_OPENGLES
glPopAttrib();
#endif
}
#endif
#ifdef KWIN_HAVE_XRENDER_COMPOSITING
if( clip() && effects->compositingType() == XRenderCompositing )