diff --git a/lib/kwinshadereffect.cpp b/lib/kwinshadereffect.cpp index a36ae9e053..26f61e14fa 100644 --- a/lib/kwinshadereffect.cpp +++ b/lib/kwinshadereffect.cpp @@ -55,6 +55,9 @@ bool ShaderEffect::loadData(const QString& shadername) { #ifndef KWIN_HAVE_OPENGL_COMPOSITING return false; +#else +#ifdef KWIN_HAVE_OPENGLES + return false; #else // If NPOT textures are not supported, use nearest power-of-two sized // texture. It wastes memory, but it's possible to support systems without @@ -97,17 +100,22 @@ bool ShaderEffect::loadData(const QString& shadername) return true; #endif +#endif } bool ShaderEffect::supported() { #ifndef KWIN_HAVE_OPENGL_COMPOSITING return false; +#else +#ifdef KWIN_HAVE_OPENGLES + return false; #else return GLRenderTarget::supported() && GLShader::fragmentShaderSupported() && (effects->compositingType() == OpenGLCompositing); #endif +#endif } bool ShaderEffect::isEnabled() const @@ -131,12 +139,14 @@ void ShaderEffect::prePaintScreen( ScreenPrePaintData& data, int time ) { mTime += time / 1000.0f; #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES if( mValid && mEnabled ) { data.mask |= PAINT_SCREEN_WITH_TRANSFORMED_WINDOWS; // Start rendering to texture effects->pushRenderTarget(mRenderTarget); } +#endif #endif effects->prePaintScreen(data, time); @@ -148,6 +158,7 @@ void ShaderEffect::postPaintScreen() effects->postPaintScreen(); #ifdef KWIN_HAVE_OPENGL_COMPOSITING +#ifndef KWIN_HAVE_OPENGLES if( mValid && mEnabled ) { // Disable render texture @@ -174,6 +185,7 @@ void ShaderEffect::postPaintScreen() mTexture->unbind(); } #endif +#endif } } // namespace diff --git a/lib/kwinshadereffect.h b/lib/kwinshadereffect.h index 9ef20a2067..055f233d3f 100644 --- a/lib/kwinshadereffect.h +++ b/lib/kwinshadereffect.h @@ -35,6 +35,10 @@ namespace KWin class GLTexture; class GLRenderTarget; class GLShader; +/** + * Unsupported in OpenGL ES + * @deprecated Use a normal Shader + */ class KWIN_EXPORT ShaderEffect : public Effect { public: