Detect when we receive an incomplete FBO and consider it invalid.

CCBUG: 210678

svn path=/trunk/KDE/kdebase/workspace/; revision=1036024
This commit is contained in:
Lucas Murray 2009-10-16 10:36:17 +00:00
parent 9f05419d06
commit e251d9316f

View file

@ -1017,13 +1017,16 @@ void GLRenderTarget::initFBO()
mTexture->target(), mTexture->texture(), 0);
GLenum status = glCheckFramebufferStatus(GL_FRAMEBUFFER_EXT);
if(status != GL_FRAMEBUFFER_COMPLETE_EXT)
{
kError(1212) << "Invalid fb status: " << status << endl;
}
glBindFramebuffer(GL_FRAMEBUFFER_EXT, 0);
if( status != GL_FRAMEBUFFER_COMPLETE_EXT )
{ // We have an incomplete framebuffer, consider it invalid
kError(1212) << "Invalid framebuffer status: " << status;
glDeleteFramebuffers(1, &mFramebuffer);
return;
}
mValid = true;
}