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:
parent
9f05419d06
commit
e251d9316f
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue