FlipSwitch ported to GLES.
Multi-screen mode not yet included
This commit is contained in:
parent
cab9154723
commit
5dfa8becb5
2 changed files with 6 additions and 1 deletions
|
@ -89,6 +89,7 @@ endif( NOT KWIN_HAVE_OPENGLES_COMPOSITING )
|
|||
|
||||
# OpenGL-specific effects
|
||||
if( KWIN_HAVE_OPENGL_COMPOSITING )
|
||||
include( flipswitch/CMakeLists.txt )
|
||||
include( glide/CMakeLists.txt )
|
||||
include( sheet/CMakeLists.txt )
|
||||
include( snaphelper/CMakeLists.txt )
|
||||
|
@ -100,7 +101,6 @@ if( KWIN_HAVE_OPENGL_COMPOSITING AND NOT KWIN_HAVE_OPENGLES_COMPOSITING )
|
|||
include( coverswitch/CMakeLists.txt )
|
||||
include( cube/CMakeLists.txt )
|
||||
include( explosion/CMakeLists.txt )
|
||||
include( flipswitch/CMakeLists.txt )
|
||||
include( invert/CMakeLists.txt )
|
||||
include( lookingglass/CMakeLists.txt )
|
||||
include( magnifier/CMakeLists.txt )
|
||||
|
|
|
@ -236,6 +236,8 @@ void FlipSwitchEffect::paintScreen( int mask, QRegion region, ScreenPaintData& d
|
|||
// TODO: move to kwinglutils
|
||||
if( effects->numScreens() > 1 )
|
||||
{
|
||||
// TODO: GLES variant
|
||||
#ifndef KWIN_HAVE_OPENGLES
|
||||
// unfortunatelly we have to change the projection matrix in dual screen mode
|
||||
QRect fullRect = effects->clientArea( FullArea, effects->activeScreen(), effects->currentDesktop() );
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
|
@ -287,6 +289,7 @@ void FlipSwitchEffect::paintScreen( int mask, QRegion region, ScreenPaintData& d
|
|||
glMatrixMode( GL_MODELVIEW );
|
||||
glPushMatrix();
|
||||
glTranslatef( xTranslate, yTranslate, 0.0 );
|
||||
#endif
|
||||
}
|
||||
|
||||
int winMask = PAINT_WINDOW_TRANSFORMED | PAINT_WINDOW_TRANSLUCENT;
|
||||
|
@ -399,11 +402,13 @@ void FlipSwitchEffect::paintScreen( int mask, QRegion region, ScreenPaintData& d
|
|||
|
||||
if( effects->numScreens() > 1 )
|
||||
{
|
||||
#ifndef KWIN_HAVE_OPENGLES
|
||||
glPopMatrix();
|
||||
// revert change of projection matrix
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
glPopMatrix();
|
||||
glMatrixMode( GL_MODELVIEW );
|
||||
#endif
|
||||
}
|
||||
|
||||
if( m_windowTitle )
|
||||
|
|
Loading…
Reference in a new issue