diff --git a/effects/demo_liquid.cpp b/effects/demo_liquid.cpp index 6b56332d85..8cd3110a5c 100644 --- a/effects/demo_liquid.cpp +++ b/effects/demo_liquid.cpp @@ -78,7 +78,7 @@ bool LiquidEffect::loadData() bool LiquidEffect::supported() { - return GLRenderTarget::supported() && + return GLRenderTarget::supported() && GLTexture::NPOTTextureSupported() && GLShader::fragmentShaderSupported() && (effects->compositingType() == OpenGLCompositing); } diff --git a/effects/test_fbo.cpp b/effects/test_fbo.cpp index b8aaea95f5..3c1e5ccef9 100644 --- a/effects/test_fbo.cpp +++ b/effects/test_fbo.cpp @@ -43,7 +43,7 @@ TestFBOEffect::~TestFBOEffect() bool TestFBOEffect::supported() { - return GLRenderTarget::supported() && + return GLRenderTarget::supported() && GLTexture::NPOTTextureSupported() && (effects->compositingType() == OpenGLCompositing); } diff --git a/lib/kwinglutils.cpp b/lib/kwinglutils.cpp index 3f855ba76f..8e4cef6061 100644 --- a/lib/kwinglutils.cpp +++ b/lib/kwinglutils.cpp @@ -720,8 +720,7 @@ bool GLRenderTarget::mSupported = false; void GLRenderTarget::initStatic() { - mSupported = hasGLExtension("GL_EXT_framebuffer_object") && glFramebufferTexture2D && - GLTexture::NPOTTextureSupported(); + mSupported = hasGLExtension("GL_EXT_framebuffer_object") && glFramebufferTexture2D; } GLRenderTarget::GLRenderTarget(GLTexture* color) @@ -781,7 +780,8 @@ void GLRenderTarget::initFBO() glGenFramebuffers(1, &mFramebuffer); glBindFramebuffer(GL_FRAMEBUFFER_EXT, mFramebuffer); - glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, mTexture->texture(), 0); + glFramebufferTexture2D(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, + mTexture->target(), mTexture->texture(), 0); GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT); if(status != GL_FRAMEBUFFER_COMPLETE_EXT)