Difference between revisions of "GLAPI/glBindFramebuffer"

From OpenGL.org
Jump to: navigation, search
m (Bot: Adding better formatting.)
m (Bot: Adding better formatting.)
 
Line 27: Line 27:
 
== See Also ==
 
== See Also ==
  
{{apifunc|glGenFramebuffers}}, {{apifunc|glDeleteFramebuffers}}, {{apifunc|glFramebufferRenderbuffer}}, {{apifunc|glFramebufferTexture}}, {{apifunc|glFramebufferTexture1D}}, {{apifunc|glFramebufferTexture2D}}, {{apifunc|glFramebufferTexture3D}}, {{apifunc|glFramebufferTextureLayer}}, {{apifunc|glIsFramebuffer}}
+
{{apifunc|glGenFramebuffers}}, {{apifunc|glDeleteFramebuffers}}, {{apifunc|glIsFramebuffer}}, {{apifunc|glFramebufferRenderbuffer}}, {{apifunc|glFramebufferTexture}}, {{apifunc|glFramebufferTextureLayer}}, {{apifunc|glBlitFramebuffer}}, {{apifunc|glCheckFramebufferStatus}}, {{apifunc|glDrawBuffers}}, {{apifunc|glDrawBuffer}}, {{apifunc|glReadBuffer}}, {{apifunc|glReadPixels}}, {{apifunc|glFramebufferParameter}}, {{apifunc|glInvalidateFramebuffer}}, {{apifunc|glInvalidateSubFramebuffer}}
  
 
== Copyright ==
 
== Copyright ==

Latest revision as of 21:39, 26 September 2012

glBindFramebuffer
Core in version 4.5
Core since version 3.0

glBindFramebuffer: bind a framebuffer to a framebuffer target

Function Definition

 void glBindFramebuffer(GLenum target​, GLuint framebuffer​);
target
Specifies the framebuffer target of the binding operation.
framebuffer
Specifies the name of the framebuffer object to bind.

Description

glBindFramebuffer binds the framebuffer object with name framebuffer​ to the framebuffer target specified by target​. target​ must be either GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER. If a framebuffer object is bound to GL_DRAW_FRAMEBUFFER or GL_READ_FRAMEBUFFER, it becomes the target for rendering or readback operations, respectively, until it is deleted or another framebuffer is bound to the corresponding bind point. Calling glBindFramebuffer with target​ set to GL_FRAMEBUFFER binds framebuffer​ to both the read and draw framebuffer targets. framebuffer​ is the name of a framebuffer object previously returned from a call to glGenFramebuffers, or zero to break the existing binding of a framebuffer object to target​.

Errors

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

GL_INVALID_OPERATION is generated if framebuffer​ is not zero or the name of a framebuffer previously returned from a call to glGenFramebuffers.

See Also

glGenFramebuffers, glDeleteFramebuffers, glIsFramebuffer, glFramebufferRenderbuffer, glFramebufferTexture, glFramebufferTextureLayer, glBlitFramebuffer, glCheckFramebufferStatus, glDrawBuffers, glDrawBuffer, glReadBuffer, glReadPixels, glFramebufferParameter, glInvalidateFramebuffer, glInvalidateSubFramebuffer

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/.