<function>glCheckFramebufferStatus</function> queries the completeness status of the framebuffer object currently bound to <parameter>target</parameter>.
<parameter>target</parameter> must be <constant>GL_DRAW_FRAMEBUFFER</constant>, <constant>GL_READ_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</constant>.
<constant>GL_FRAMEBUFFER</constant> is equivalent to <constant>GL_DRAW_FRAMEBUFFER</constant>.
</para>
<para>
The return value is <constant>GL_FRAMEBUFFER_COMPLETE</constant> if the framebuffer bound to <parameter>target</parameter> is complete. Otherwise,
the return value is determined as follows:
<itemizedlist>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_UNDEFINED</constant> is returned if <parameter>target</parameter> is the default framebuffer, but the default framebuffer does not exist.
</para>
</listitem>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT</constant> is returned if any of the framebuffer attachment points are framebuffer incomplete.
</para>
</listitem>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT</constant> is returned if the framebuffer does not have at least one image attached to it.
</para>
</listitem>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER</constant> is returned if the value of <constant>GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE</constant>
<constant>GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER</constant> is returned if <constant>GL_READ_BUFFER</constant> is not <constant>GL_NONE</constant>
and the value of <constant>GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE</constant> is <constant>GL_NONE</constant> for the color attachment point named
by <constant>GL_READ_BUFFER</constant>.
</para>
</listitem>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_UNSUPPORTED</constant> is returned if the combination of internal formats of the attached images violates
an implementation-dependent set of restrictions.
</para>
</listitem>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE</constant> is returned if the value of <constant>GL_RENDERBUFFER_SAMPLES</constant> is not the same
for all attached renderbuffers; if the value of <constant>GL_TEXTURE_SAMPLES</constant> is the not same for all attached textures; or, if the attached
images are a mix of renderbuffers and textures, the value of <constant>GL_RENDERBUFFER_SAMPLES</constant> does not match the value of
<constant>GL_TEXTURE_SAMPLES</constant>.
</para>
</listitem>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE</constant> is also returned if the value of <constant>GL_TEXTURE_FIXED_SAMPLE_LOCATIONS</constant> is
not the same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of <constant>GL_TEXTURE_FIXED_SAMPLE_LOCATIONS</constant>
is not <constant>GL_TRUE</constant> for all attached textures.
</para>
</listitem>
<listitem>
<para>
<constant>GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS</constant> is 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.
</para>
</listitem>
</itemizedlist>
</para>
<para>
Additionally, if an error occurs, zero is returned.
</para>
</refsect1>
<refsect1id="errors"><title>Errors</title>
<para>
<constant>GL_INVALID_ENUM</constant> is generated if <parameter>target</parameter> is not <constant>GL_DRAW_FRAMEBUFFER</constant>,
<constant>GL_READ_FRAMEBUFFER</constant> or <constant>GL_FRAMEBUFFER</constant>.