From 5e94274eb6f11ba54f586d89c39db3e94a941e19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 18 Feb 2009 11:58:36 +0000 Subject: [PATCH] We cannot use glLists for painting the cube. It's causing black windows. BUG: 183905 svn path=/trunk/KDE/kdebase/workspace/; revision=927767 --- effects/cube/cube.cpp | 23 ++++++++++++----------- effects/cube/cubeslide.cpp | 12 ++---------- effects/cube/cubeslide.h | 1 - 3 files changed, 14 insertions(+), 22 deletions(-) diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp index a0c4add249..df397c55f2 100644 --- a/effects/cube/cube.cpp +++ b/effects/cube/cube.cpp @@ -309,13 +309,6 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) glPopMatrix(); } - // compile List for cube - glNewList( glList + 1, GL_COMPILE ); - glPushMatrix(); - paintCube( mask, region, data ); - glPopMatrix(); - glEndList(); - QRect rect = effects->clientArea( FullScreenArea, activeScreen, effects->currentDesktop()); if( effects->numScreens() > 1 && bigCube ) rect = effects->clientArea( FullArea, activeScreen, effects->currentDesktop() ); @@ -444,7 +437,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) } glPushMatrix(); glCallList( glList ); - glCallList( glList + 1 ); + glPushMatrix(); + paintCube( mask, region, data ); + glPopMatrix(); glPopMatrix(); glCullFace( GL_BACK ); if( mode == Cylinder ) @@ -455,7 +450,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) } glPushMatrix(); glCallList( glList ); - glCallList( glList + 1 ); + glPushMatrix(); + paintCube( mask, region, data ); + glPopMatrix(); glPopMatrix(); // cap @@ -549,7 +546,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) } glPushMatrix(); glCallList( glList ); - glCallList( glList + 1 ); + glPushMatrix(); + paintCube( mask, region, data ); + glPopMatrix(); glPopMatrix(); glCullFace( GL_FRONT ); if( mode == Cylinder ) @@ -566,7 +565,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) } glPushMatrix(); glCallList( glList ); - glCallList( glList + 1 ); + glPushMatrix(); + paintCube( mask, region, data ); + glPopMatrix(); glPopMatrix(); // cap diff --git a/effects/cube/cubeslide.cpp b/effects/cube/cubeslide.cpp index b0e858a3e0..66e7a6660f 100644 --- a/effects/cube/cubeslide.cpp +++ b/effects/cube/cubeslide.cpp @@ -75,21 +75,15 @@ void CubeSlideEffect::paintScreen( int mask, QRegion region, ScreenPaintData& da { if( !slideRotations.empty() ) { - glPushMatrix(); - glNewList( glList, GL_COMPILE ); - paintSlideCube( mask, region, data ); - glEndList(); - glPopMatrix(); - glPushAttrib( GL_CURRENT_BIT | GL_ENABLE_BIT ); glEnable( GL_CULL_FACE ); glCullFace( GL_BACK ); glPushMatrix(); - glCallList( glList ); + paintSlideCube( mask, region, data ); glPopMatrix(); glCullFace( GL_FRONT ); glPushMatrix(); - glCallList( glList ); + paintSlideCube( mask, region, data ); glPopMatrix(); glDisable( GL_CULL_FACE ); glPopAttrib(); @@ -243,7 +237,6 @@ void CubeSlideEffect::postPaintScreen() if( slideRotations.empty() ) { effects->setActiveFullScreenEffect( 0 ); - glDeleteLists( glList, 1 ); } } effects->addRepaintFull(); @@ -323,7 +316,6 @@ void CubeSlideEffect::desktopChanged( int old ) if( activate ) { effects->setActiveFullScreenEffect( this ); - glList = glGenLists( 1 ); timeLine.setProgress( 0.0 ); front_desktop = old; effects->addRepaintFull(); diff --git a/effects/cube/cubeslide.h b/effects/cube/cubeslide.h index 5f2f5a5b23..f793c9339a 100644 --- a/effects/cube/cubeslide.h +++ b/effects/cube/cubeslide.h @@ -61,7 +61,6 @@ class CubeSlideEffect QSet stickyWindows; bool dontSlidePanels; bool dontSlideStickyWindows; - GLuint glList; }; }