We cannot use glLists for painting the cube. It's causing black windows.

BUG: 183905

svn path=/trunk/KDE/kdebase/workspace/; revision=927767
This commit is contained in:
Martin Gräßlin 2009-02-18 11:58:36 +00:00
parent cb28513163
commit 5e94274eb6
3 changed files with 14 additions and 22 deletions

View file

@ -309,13 +309,6 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
glPopMatrix(); 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()); QRect rect = effects->clientArea( FullScreenArea, activeScreen, effects->currentDesktop());
if( effects->numScreens() > 1 && bigCube ) if( effects->numScreens() > 1 && bigCube )
rect = effects->clientArea( FullArea, activeScreen, effects->currentDesktop() ); rect = effects->clientArea( FullArea, activeScreen, effects->currentDesktop() );
@ -444,7 +437,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
} }
glPushMatrix(); glPushMatrix();
glCallList( glList ); glCallList( glList );
glCallList( glList + 1 ); glPushMatrix();
paintCube( mask, region, data );
glPopMatrix();
glPopMatrix(); glPopMatrix();
glCullFace( GL_BACK ); glCullFace( GL_BACK );
if( mode == Cylinder ) if( mode == Cylinder )
@ -455,7 +450,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
} }
glPushMatrix(); glPushMatrix();
glCallList( glList ); glCallList( glList );
glCallList( glList + 1 ); glPushMatrix();
paintCube( mask, region, data );
glPopMatrix();
glPopMatrix(); glPopMatrix();
// cap // cap
@ -549,7 +546,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
} }
glPushMatrix(); glPushMatrix();
glCallList( glList ); glCallList( glList );
glCallList( glList + 1 ); glPushMatrix();
paintCube( mask, region, data );
glPopMatrix();
glPopMatrix(); glPopMatrix();
glCullFace( GL_FRONT ); glCullFace( GL_FRONT );
if( mode == Cylinder ) if( mode == Cylinder )
@ -566,7 +565,9 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
} }
glPushMatrix(); glPushMatrix();
glCallList( glList ); glCallList( glList );
glCallList( glList + 1 ); glPushMatrix();
paintCube( mask, region, data );
glPopMatrix();
glPopMatrix(); glPopMatrix();
// cap // cap

View file

@ -75,21 +75,15 @@ void CubeSlideEffect::paintScreen( int mask, QRegion region, ScreenPaintData& da
{ {
if( !slideRotations.empty() ) if( !slideRotations.empty() )
{ {
glPushMatrix();
glNewList( glList, GL_COMPILE );
paintSlideCube( mask, region, data );
glEndList();
glPopMatrix();
glPushAttrib( GL_CURRENT_BIT | GL_ENABLE_BIT ); glPushAttrib( GL_CURRENT_BIT | GL_ENABLE_BIT );
glEnable( GL_CULL_FACE ); glEnable( GL_CULL_FACE );
glCullFace( GL_BACK ); glCullFace( GL_BACK );
glPushMatrix(); glPushMatrix();
glCallList( glList ); paintSlideCube( mask, region, data );
glPopMatrix(); glPopMatrix();
glCullFace( GL_FRONT ); glCullFace( GL_FRONT );
glPushMatrix(); glPushMatrix();
glCallList( glList ); paintSlideCube( mask, region, data );
glPopMatrix(); glPopMatrix();
glDisable( GL_CULL_FACE ); glDisable( GL_CULL_FACE );
glPopAttrib(); glPopAttrib();
@ -243,7 +237,6 @@ void CubeSlideEffect::postPaintScreen()
if( slideRotations.empty() ) if( slideRotations.empty() )
{ {
effects->setActiveFullScreenEffect( 0 ); effects->setActiveFullScreenEffect( 0 );
glDeleteLists( glList, 1 );
} }
} }
effects->addRepaintFull(); effects->addRepaintFull();
@ -323,7 +316,6 @@ void CubeSlideEffect::desktopChanged( int old )
if( activate ) if( activate )
{ {
effects->setActiveFullScreenEffect( this ); effects->setActiveFullScreenEffect( this );
glList = glGenLists( 1 );
timeLine.setProgress( 0.0 ); timeLine.setProgress( 0.0 );
front_desktop = old; front_desktop = old;
effects->addRepaintFull(); effects->addRepaintFull();

View file

@ -61,7 +61,6 @@ class CubeSlideEffect
QSet<EffectWindow*> stickyWindows; QSet<EffectWindow*> stickyWindows;
bool dontSlidePanels; bool dontSlidePanels;
bool dontSlideStickyWindows; bool dontSlideStickyWindows;
GLuint glList;
}; };
} }