Difference between revisions of "GLAPI/glCheckFramebufferStatus"

From OpenGL.org
Jump to: navigation, search
m (Renaming category: 'GL 4 API Framebuffer Objects' to 'Core API Ref Framebuffer Objects'.)
m (Bot: Adding better formatting.)
(4 intermediate revisions by 2 users not shown)
Line 8: Line 8:
 
== Function Definition ==
 
== Function Definition ==
  
   GLenum '''glCheckFramebufferStatus'''(GLenum ''target'');
+
   GLenum '''glCheckFramebufferStatus'''(GLenum {{param|target}});
  
 
; target
 
; target
Line 15: Line 15:
 
== Description ==
 
== Description ==
  
'''glCheckFramebufferStatus''' queries the completeness status of the framebuffer object currently bound to ''target''. ''target'' must be {{code|GL_DRAW_FRAMEBUFFER}}, {{code|GL_READ_FRAMEBUFFER}} or {{code|GL_FRAMEBUFFER}}. {{code|GL_FRAMEBUFFER}} is equivalent to {{code|GL_DRAW_FRAMEBUFFER}}.
+
'''glCheckFramebufferStatus''' queries the completeness status of the framebuffer object currently bound to {{param|target}}. {{param|target}} must be {{enum|GL_DRAW_FRAMEBUFFER}}, {{enum|GL_READ_FRAMEBUFFER}} or {{enum|GL_FRAMEBUFFER}}. {{enum|GL_FRAMEBUFFER}} is equivalent to {{enum|GL_DRAW_FRAMEBUFFER}}.
  
The return value is {{code|GL_FRAMEBUFFER_COMPLETE}} if the framebuffer bound to ''target'' is complete. Otherwise, the return value is determined as follows: * {{code|GL_FRAMEBUFFER_UNDEFINED}} is returned if ''target'' is the default framebuffer, but the default framebuffer does not exist.
+
The return value is {{enum|GL_FRAMEBUFFER_COMPLETE}} if the framebuffer bound to {{param|target}} is complete. Otherwise, the return value is determined as follows: * {{enum|GL_FRAMEBUFFER_UNDEFINED}} is returned if {{param|target}} is the default framebuffer, but the default framebuffer does not exist.
  
* {{code|GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT}} is returned if any of the framebuffer attachment points are framebuffer incomplete.
+
* {{enum|GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT}} is returned if any of the framebuffer attachment points are framebuffer incomplete.
  
* {{code|GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT}} is returned if the framebuffer does not have at least one image attached to it.
+
* {{enum|GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT}} is returned if the framebuffer does not have at least one image attached to it.
  
* {{code|GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER}} is returned if the value of {{code|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}} is {{code|GL_NONE}} for any color attachment point(s) named by {{code|GL_DRAWBUFFERi}}.
+
* {{enum|GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER}} is returned if the value of {{enum|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}} is {{enum|GL_NONE}} for any color attachment point(s) named by {{enum|GL_DRAWBUFFERi}}.
  
* {{code|GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER}} is returned if {{code|GL_READ_BUFFER}} is not {{code|GL_NONE}} and the value of {{code|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}} is {{code|GL_NONE}} for the color attachment point named by {{code|GL_READ_BUFFER}}.
+
* {{enum|GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER}} is returned if {{enum|GL_READ_BUFFER}} is not {{enum|GL_NONE}} and the value of {{enum|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}} is {{enum|GL_NONE}} for the color attachment point named by {{enum|GL_READ_BUFFER}}.
  
* {{code|GL_FRAMEBUFFER_UNSUPPORTED}} is returned if the combination of internal formats of the attached images violates an implementation-dependent set of restrictions.
+
* {{enum|GL_FRAMEBUFFER_UNSUPPORTED}} is returned if the combination of internal formats of the attached images violates an implementation-dependent set of restrictions.
  
* {{code|GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE}} is returned if the value of {{code|GL_RENDERBUFFER_SAMPLES}} is not the same for all attached renderbuffers; if the value of {{code|GL_TEXTURE_SAMPLES}} is the not same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of {{code|GL_RENDERBUFFER_SAMPLES}} does not match the value of {{code|GL_TEXTURE_SAMPLES}}.
+
* {{enum|GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE}} is returned if the value of {{enum|GL_RENDERBUFFER_SAMPLES}} is not the same for all attached renderbuffers; if the value of {{enum|GL_TEXTURE_SAMPLES}} is the not same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of {{enum|GL_RENDERBUFFER_SAMPLES}} does not match the value of {{enum|GL_TEXTURE_SAMPLES}}.
  
* {{code|GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE}} is also returned if the value of {{code|GL_TEXTURE_FIXED_SAMPLE_LOCATIONS}} is not the same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of {{code|GL_TEXTURE_FIXED_SAMPLE_LOCATIONS}} is not {{code|GL_TRUE}} for all attached textures.
+
* {{enum|GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE}} is also returned if the value of {{enum|GL_TEXTURE_FIXED_SAMPLE_LOCATIONS}} is not the same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of {{enum|GL_TEXTURE_FIXED_SAMPLE_LOCATIONS}} is not {{enum|GL_TRUE}} for all attached textures.
  
* {{code|GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS}} 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.
+
* {{enum|GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS}} 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.
  
  
Line 41: Line 41:
 
== Errors ==
 
== Errors ==
  
{{code|GL_INVALID_ENUM}} is generated if ''target'' is not {{code|GL_DRAW_FRAMEBUFFER}}, {{code|GL_READ_FRAMEBUFFER}} or {{code|GL_FRAMEBUFFER}}.
+
{{enum|GL_INVALID_ENUM}} is generated if {{param|target}} is not {{enum|GL_DRAW_FRAMEBUFFER}}, {{enum|GL_READ_FRAMEBUFFER}} or {{enum|GL_FRAMEBUFFER}}.
  
 
== See Also ==
 
== See Also ==
  
[[GLAPI/glGenFramebuffers|glGenFramebuffers]], [[GLAPI/glDeleteFramebuffers|glDeleteFramebuffers]][[GLAPI/glBindFramebuffer|glBindFramebuffer]]
+
{{apifunc|glBindFramebuffer}}, {{apifunc|glDrawBuffers}}, {{apifunc|glDrawBuffer}}, {{apifunc|glReadBuffer}}, {{apifunc|glFramebufferRenderbuffer}}, {{apifunc|glFramebufferTexture}}, {{apifunc|glFramebufferTextureLayer}}, {{apifunc|glFramebufferParameter}}
  
 
== Copyright ==
 
== Copyright ==
Line 51: Line 51:
 
Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].
 
Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. [http://opencontent.org/openpub/ http://opencontent.org/openpub/].
  
[[Category:API Reference 4|CheckFramebufferStatus]]
 
 
[[Category:Core API Ref Framebuffer Objects|CheckFramebufferStatus]]
 
[[Category:Core API Ref Framebuffer Objects|CheckFramebufferStatus]]
 +
[[Category:Core API Reference|CheckFramebufferStatus]]

Revision as of 21:40, 26 September 2012

glCheckFramebufferStatus
Core in version 4.5
Core since version 3.0

glCheckFramebufferStatus: check the completeness status of a framebuffer

Function Definition

 GLenum glCheckFramebufferStatus(GLenum target​);
target
Specify the target of the framebuffer completeness check.

Description

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_COMPLETE if the framebuffer bound to target​ is complete. Otherwise, the return value is determined as follows: * GL_FRAMEBUFFER_UNDEFINED is returned if target​ is the default framebuffer, but the default framebuffer does not exist.

  • GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT is returned if any of the framebuffer attachment points are framebuffer incomplete.
  • GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT is returned if the framebuffer does not have at least one image attached to it.
  • GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER is returned if the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is GL_NONE for any color attachment point(s) named by GL_DRAWBUFFERi.
  • GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER is returned if GL_READ_BUFFER is not GL_NONE and the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is GL_NONE for the color attachment point named by GL_READ_BUFFER.
  • GL_FRAMEBUFFER_UNSUPPORTED is returned if the combination of internal formats of the attached images violates an implementation-dependent set of restrictions.
  • GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE is returned if the value of GL_RENDERBUFFER_SAMPLES is not the same for all attached renderbuffers; if the value of GL_TEXTURE_SAMPLES is the not same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of GL_RENDERBUFFER_SAMPLES does not match the value of GL_TEXTURE_SAMPLES.
  • GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE is also returned if the value of GL_TEXTURE_FIXED_SAMPLE_LOCATIONS is not the same for all attached textures; or, if the attached images are a mix of renderbuffers and textures, the value of GL_TEXTURE_FIXED_SAMPLE_LOCATIONS is not GL_TRUE for all attached textures.
  • GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 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.


Additionally, if an error occurs, zero is returned.

Errors

GL_INVALID_ENUM is generated if target​ is not GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER.

See Also

glBindFramebuffer, glDrawBuffers, glDrawBuffer, glReadBuffer, glFramebufferRenderbuffer, glFramebufferTexture, glFramebufferTextureLayer, glFramebufferParameter

Copyright

Copyright © 2010 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.