diff --git a/effects/configs_builtins.cpp b/effects/configs_builtins.cpp
index ad5f4a6311..b896ed7fe1 100644
--- a/effects/configs_builtins.cpp
+++ b/effects/configs_builtins.cpp
@@ -54,7 +54,7 @@ along with this program. If not, see .
#include "magnifier/magnifier_config.h"
#include "sharpen/sharpen_config.h"
#include "snow/snow_config.h"
-#endif KWIN_HAVE_OPENGLES
+#endif
#endif
#include
@@ -96,7 +96,7 @@ KWIN_EFFECT_CONFIG_MULTIPLE( builtins,
KWIN_EFFECT_CONFIG_SINGLE( magnifier, MagnifierEffectConfig )
KWIN_EFFECT_CONFIG_SINGLE( sharpen, SharpenEffectConfig )
KWIN_EFFECT_CONFIG_SINGLE( snow, SnowEffectConfig )
-#endif KWIN_HAVE_OPENGLES
+#endif
#endif
)
diff --git a/effects/cube/cube.cpp b/effects/cube/cube.cpp
index 7da83bad9e..cd0f16f92f 100644
--- a/effects/cube/cube.cpp
+++ b/effects/cube/cube.cpp
@@ -88,10 +88,10 @@ CubeEffect::CubeEffect()
, zOrderingFactor( 0.0f )
, mAddedHeightCoeff1( 0.0f )
, mAddedHeightCoeff2( 0.0f )
- , m_cubeCapBuffer( NULL )
, capListCreated( false )
, recompileList( true )
, glList( 0 )
+ , m_cubeCapBuffer( NULL )
, m_proxy( this )
{
desktopNameFont.setBold( true );
@@ -467,17 +467,17 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
#endif
// call the inside cube effects
+#ifndef KWIN_HAVE_OPENGLES
foreach( CubeInsideEffect* inside, m_cubeInsideEffects )
{
-#ifndef KWIN_HAVE_OPENGLES
glPushMatrix();
glCallList( glList );
glTranslatef( rect.width()/2, rect.height()/2, -point-zTranslate );
glRotatef( (1-frontDesktop)*360.0f / effects->numberOfDesktops(), 0.0, 1.0, 0.0 );
inside->paint();
glPopMatrix();
-#endif
}
+#endif
glCullFace( GL_FRONT );
if( mode == Cylinder )
@@ -610,17 +610,17 @@ void CubeEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data )
// call the inside cube effects
+#ifndef KWIN_HAVE_OPENGLES
foreach( CubeInsideEffect* inside, m_cubeInsideEffects )
{
-#ifndef KWIN_HAVE_OPENGLES
glPushMatrix();
glCallList( glList );
glTranslatef( rect.width()/2, rect.height()/2, -point-zTranslate );
glRotatef( (1-frontDesktop)*360.0f / effects->numberOfDesktops(), 0.0, 1.0, 0.0 );
inside->paint();
glPopMatrix();
-#endif
}
+#endif
glCullFace( GL_BACK );
if( mode == Cylinder )
diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp
index 9442e284ce..b1389f4d06 100644
--- a/lib/kwinglutils.cpp
+++ b/lib/kwinglutils.cpp
@@ -182,7 +182,15 @@ void renderGLGeometry( const QRegion& region, int count,
const float* vertices, const float* texture, const float* color,
int dim, int stride )
{
-#ifndef KWIN_HAVE_OPENGLES
+#ifdef KWIN_HAVE_OPENGLES
+ Q_UNUSED(region)
+ Q_UNUSED(count)
+ Q_UNUSED(vertices)
+ Q_UNUSED(texture)
+ Q_UNUSED(color)
+ Q_UNUSED(dim)
+ Q_UNUSED(stride)
+#else
// Using arrays only makes sense if we have larger number of vertices.
// Otherwise overhead of enabling/disabling them is too big.
bool use_arrays = (count > 5);
@@ -239,7 +247,14 @@ void renderGLGeometry( const QRegion& region, int count,
void renderGLGeometryImmediate( int count, const float* vertices, const float* texture, const float* color,
int dim, int stride )
{
-#ifndef KWIN_HAVE_OPENGLES
+#ifdef KWIN_HAVE_OPENGLES
+ Q_UNUSED(count)
+ Q_UNUSED(vertices)
+ Q_UNUSED(texture)
+ Q_UNUSED(color)
+ Q_UNUSED(dim)
+ Q_UNUSED(stride)
+#else
// Find out correct glVertex*fv function according to dim parameter.
void ( *glVertexFunc )( const float* ) = glVertex2fv;
if( dim == 3 )
@@ -712,7 +727,11 @@ void GLTexture::enableFilter()
}
static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum texture_format)
- { // Copied from Qt
+ {
+#ifdef KWIN_HAVE_OPENGLES
+ Q_UNUSED(texture_format)
+#endif
+ // Copied from Qt
Q_ASSERT(dst.size() == img.size());
Q_ASSERT(dst.depth() == 32);
Q_ASSERT(img.depth() == 32);
@@ -1551,7 +1570,10 @@ GLVertexBuffer *GLVertexBufferPrivate::streamingBuffer = NULL;
void GLVertexBufferPrivate::legacyPainting( QRegion region, GLenum primitiveMode )
{
-#ifndef KWIN_HAVE_OPENGLES
+#ifdef KWIN_HAVE_OPENGLES
+ Q_UNUSED(region)
+ Q_UNUSED(primitiveMode)
+#else
// Enable arrays
glEnableClientState( GL_VERTEX_ARRAY );
glVertexPointer( dimension, GL_FLOAT, 0, legacyVertices.constData() );
diff --git a/scene_opengl.cpp b/scene_opengl.cpp
index 625232a9ef..1eec45123b 100644
--- a/scene_opengl.cpp
+++ b/scene_opengl.cpp
@@ -796,7 +796,12 @@ void SceneOpenGL::Window::prepareShaderRenderStates( TextureType type, double op
void SceneOpenGL::Window::prepareRenderStates( TextureType type, double opacity, double brightness, double saturation )
{
-#ifndef KWIN_HAVE_OPENGLES
+#ifdef KWIN_HAVE_OPENGLES
+ Q_UNUSED(type)
+ Q_UNUSED(opacity)
+ Q_UNUSED(brightness)
+ Q_UNUSED(saturation)
+#else
Texture* tex;
bool alpha = false;
bool opaque = true;
@@ -988,7 +993,12 @@ void SceneOpenGL::Window::restoreShaderRenderStates( TextureType type, double op
void SceneOpenGL::Window::restoreRenderStates( TextureType type, double opacity, double brightness, double saturation )
{
-#ifndef KWIN_HAVE_OPENGLES
+#ifdef KWIN_HAVE_OPENGLES
+ Q_UNUSED(type)
+ Q_UNUSED(opacity)
+ Q_UNUSED(brightness)
+ Q_UNUSED(saturation)
+#else
Texture* tex;
switch( type )
{
@@ -1041,8 +1051,8 @@ SceneOpenGL::EffectFrame::EffectFrame( EffectFrameImpl* frame )
: Scene::EffectFrame( frame )
, m_texture( NULL )
, m_textTexture( NULL )
- , m_textPixmap( NULL )
, m_oldTextTexture( NULL )
+ , m_textPixmap( NULL )
, m_iconTexture( NULL )
, m_oldIconTexture( NULL )
, m_selectionTexture( NULL )
diff --git a/scene_opengl_egl.cpp b/scene_opengl_egl.cpp
index f24a09baab..a3d4eed699 100644
--- a/scene_opengl_egl.cpp
+++ b/scene_opengl_egl.cpp
@@ -199,6 +199,7 @@ void SceneOpenGL::waitSync()
void SceneOpenGL::flushBuffer( int mask, QRegion damage )
{
+ Q_UNUSED(damage)
glFlush();
if( mask & PAINT_SCREEN_REGION )
{