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

CCBUG: 210678

svn path=/trunk/KDE/kdebase/workspace/; revision=1036024
icc-effect-5.14.5
Lucas Murray 2009-10-16 10:36:17 +00:00
parent 9f05419d06
commit e251d9316f
1 changed files with 7 additions and 4 deletions

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;
}