Checka the completeness status of a framebuffer
glCheckFramebufferStatus queries the completeness status of the framebuffer object currently bound to target. target must be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER. GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER. The return value is
GL_FRAMEBUFFER_COMPLETEif the framebuffer bound to
targetis complete. Otherwise, the return value is determined as follows:
GL_FRAMEBUFFER_UNDEFINEDis returned if
targetis the default framebuffer, but the default framebuffer does not exist.
GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENTis returned if any of the framebuffer attachment points are framebuffer incomplete.
GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENTis returned if the framebuffer does not have at least one image attached to it.
GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFERis returned if the value of
GL_NONEfor any color attachment point(s) named by
GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFERis returned if
GL_NONEand the value of
GL_NONEfor the color attachment point named by
GL_FRAMEBUFFER_UNSUPPORTEDis returned if the combination of internal formats of the attached images violates an implementation-dependent set of restrictions.
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLEis returned if the value of
GL_RENDERBUFFER_SAMPLESis not the same for all attached renderbuffers; if the value of
GL_TEXTURE_SAMPLESis the not same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of
GL_RENDERBUFFER_SAMPLESdoes not match the value of
GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLEis also returned if the value of
GL_TEXTURE_FIXED_SAMPLE_LOCATIONSis not the same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of
GL_TRUEfor all attached textures.
GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETSis returned if any framebuffer attachment is layered, and any populated attachment is not layered, or if all populated color attachments are not from textures of the same target.
Additionally, if an error occurs, zero is returned.