Well, actually GLRenderTarget doesn't require NPOT textures (it works with rectangle textures as well).

That also means that those effects which do require NPOT have to check for it themselves.

svn path=/branches/work/kwin_composite/; revision=659155
This commit is contained in:
Rivo Laks 2007-04-29 15:39:33 +00:00
parent 17ae1620ac
commit a94aa904b0
3 changed files with 5 additions and 5 deletions

View file

@ -78,7 +78,7 @@ bool LiquidEffect::loadData()
bool LiquidEffect::supported()
{
return GLRenderTarget::supported() &&
return GLRenderTarget::supported() && GLTexture::NPOTTextureSupported() &&
GLShader::fragmentShaderSupported() &&
(effects->compositingType() == OpenGLCompositing);
}

View file

@ -43,7 +43,7 @@ TestFBOEffect::~TestFBOEffect()
bool TestFBOEffect::supported()
{
return GLRenderTarget::supported() &&
return GLRenderTarget::supported() && GLTexture::NPOTTextureSupported() &&
(effects->compositingType() == OpenGLCompositing);
}

View file

@ -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)