diff --git a/COMPOSITE_TODO b/COMPOSITE_TODO index 7f62b79514..b9cd7a9355 100644 --- a/COMPOSITE_TODO +++ b/COMPOSITE_TODO @@ -76,6 +76,9 @@ General TODO % clean up and sort out shortcuts so that they don't conflict and make sense - also make configurable etc. +% installed headers currently include config.h files to find out about e.g. OpenGL + - this needs to be sorted out somehow, installed headers shouldn't do this + OpenGL TODO ================================= diff --git a/effects.cpp b/effects.cpp index 37df4dafe8..538978fc5d 100644 --- a/effects.cpp +++ b/effects.cpp @@ -1003,29 +1003,37 @@ EffectWindowList EffectWindowImpl::mainWindows() const QVector& EffectWindowImpl::vertices() { +#ifdef HAVE_OPENGL if( SceneOpenGL::Window* w = dynamic_cast< SceneOpenGL::Window* >( sceneWindow())) return w->vertices(); +#endif abort(); // TODO } void EffectWindowImpl::requestVertexGrid(int maxquadsize) { +#ifdef HAVE_OPENGL if( SceneOpenGL::Window* w = dynamic_cast< SceneOpenGL::Window* >( sceneWindow())) return w->requestVertexGrid( maxquadsize ); +#endif abort(); // TODO } void EffectWindowImpl::markVerticesDirty() { +#ifdef HAVE_OPENGL if( SceneOpenGL::Window* w = dynamic_cast< SceneOpenGL::Window* >( sceneWindow())) return w->markVerticesDirty(); +#endif abort(); // TODO } - void EffectWindowImpl::setShader(GLShader* shader) +void EffectWindowImpl::setShader(GLShader* shader) { +#ifdef HAVE_OPENGL if( SceneOpenGL::Window* w = dynamic_cast< SceneOpenGL::Window* >( sceneWindow())) return w->setShader(shader); +#endif abort(); // TODO } diff --git a/effects/CMakeLists.txt b/effects/CMakeLists.txt index 754b16356d..c8532cfd94 100644 --- a/effects/CMakeLists.txt +++ b/effects/CMakeLists.txt @@ -30,7 +30,6 @@ SET(kwin4_effect_builtins_sources SET(kwin4_effect_tests_sources demo_shiftworkspaceup.cpp - demo_showpicture.cpp demo_taskbarthumbnail.cpp howto.cpp test_input.cpp @@ -50,6 +49,7 @@ if(OPENGL_FOUND) SET(kwin4_effect_tests_sources ${kwin4_effect_tests_sources} test_fbo.cpp demo_liquid.cpp + demo_showpicture.cpp ) install( FILES @@ -62,6 +62,7 @@ if(OPENGL_FOUND) wavywindows.desktop test_fbo.desktop demo_liquid.desktop + demo_showpicture.desktop DESTINATION ${DATA_INSTALL_DIR}/kwin/effects ) install( FILES @@ -119,7 +120,6 @@ install( FILES thumbnailaside.desktop zoom.desktop demo_shiftworkspaceup.desktop - demo_showpicture.desktop demo_taskbarthumbnail.desktop test_input.desktop test_thumbnail.desktop diff --git a/effects/demo_showpicture.cpp b/effects/demo_showpicture.cpp index 64796e4d09..7a5f83dca9 100644 --- a/effects/demo_showpicture.cpp +++ b/effects/demo_showpicture.cpp @@ -32,7 +32,6 @@ ShowPictureEffect::~ShowPictureEffect() void ShowPictureEffect::paintScreen( int mask, QRegion region, ScreenPaintData& data ) { effects->paintScreen( mask, region, data ); -#ifdef HAVE_OPENGL if( init ) { loadPicture(); @@ -48,12 +47,10 @@ void ShowPictureEffect::paintScreen( int mask, QRegion region, ScreenPaintData& picture->unbind(); glPopAttrib(); } -#endif } void ShowPictureEffect::loadPicture() { -#ifdef HAVE_OPENGL QString file = KGlobal::dirs()->findResource( "appdata", "showpicture.png" ); if( file.isEmpty()) return; @@ -62,7 +59,6 @@ void ShowPictureEffect::loadPicture() picture = new GLTexture( im ); pictureRect = QRect( area.x() + ( area.width() - im.width()) / 2, area.y() + ( area.height() - im.height()) / 2, im.width(), im.height()); -#endif } } // namespace diff --git a/lib/kwinglutils.h b/lib/kwinglutils.h index e929569916..58e03b13cb 100644 --- a/lib/kwinglutils.h +++ b/lib/kwinglutils.h @@ -17,7 +17,6 @@ License. See the file "COPYING" for the exact licensing terms. #include #include #include -#endif #include @@ -61,8 +60,6 @@ inline bool KWIN_EXPORT isPowerOfTwo( int x ) { return (( x & ( x - 1 )) == 0 ); **/ int KWIN_EXPORT nearestPowerOfTwo( int x ); -#ifdef HAVE_OPENGL - // renders quads using the given vertices KWIN_EXPORT void renderGLGeometry( bool clip, QRegion region, const float* vertices, const float* texture, int count, int dim = 2, int stride = 0 ); @@ -215,8 +212,9 @@ class KWIN_EXPORT GLRenderTarget GLuint mFramebuffer; }; -#endif } // namespace #endif + +#endif