Difference between revisions of "GLAPI/glFramebufferRenderbuffer"

From OpenGL.org
Jump to: navigation, search
(4.0 API.)
 
m (Bot: Adding better formatting.)
(5 intermediate revisions by the same user not shown)
Line 8: Line 8:
 
== Function Definition ==
 
== Function Definition ==
  
   GLsync '''glFramebufferRenderbuffer'''(GLenum ''target'', GLenum ''attachment'', GLenum ''renderbuffertarget'', GLuint ''renderbuffer'');
+
   GLsync '''glFramebufferRenderbuffer'''(GLenum {{param|target}}, GLenum {{param|attachment}}, GLenum {{param|renderbuffertarget}}, GLuint {{param|renderbuffer}});
  
 
; target
 
; target
: Specifies the framebuffer 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}}.
+
: Specifies the framebuffer 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}}.
 
; attachment
 
; attachment
 
: Specifies the attachment point of the framebuffer.
 
: Specifies the attachment point of the framebuffer.
 
; renderbuffertarget
 
; renderbuffertarget
: Specifies the renderbuffer target and must be {{code|GL_RENDERBUFFER}}.
+
: Specifies the renderbuffer target and must be {{enum|GL_RENDERBUFFER}}.
 
; renderbuffer
 
; renderbuffer
: Specifies the name of an existing renderbuffer object of type ''renderbuffertarget'' to attach.
+
: Specifies the name of an existing renderbuffer object of type {{param|renderbuffertarget}} to attach.
  
 
== Description ==
 
== Description ==
  
'''glFramebufferRenderbuffer''' attaches a renderbuffer as one of the logical buffers of the currently bound framebuffer object. ''renderbuffer'' is the name of the renderbuffer object to attach and must be either zero, or the name of an existing renderbuffer object of type ''renderbuffertarget''. If ''renderbuffer'' is not zero and if '''glFramebufferRenderbuffer''' is successful, then the renderbuffer name ''renderbuffer'' will be used as the logical buffer identified by ''attachment'' of the framebuffer currently bound to ''target''.
+
'''glFramebufferRenderbuffer''' attaches a renderbuffer as one of the logical buffers of the currently bound framebuffer object. {{param|renderbuffer}} is the name of the renderbuffer object to attach and must be either zero, or the name of an existing renderbuffer object of type {{param|renderbuffertarget}}. If {{param|renderbuffer}} is not zero and if '''glFramebufferRenderbuffer''' is successful, then the renderbuffer name {{param|renderbuffer}} will be used as the logical buffer identified by {{param|attachment}} of the framebuffer currently bound to {{param|target}}.
  
The value of {{code|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}} for the specified attachment point is set to {{code|GL_RENDERBUFFER}} and the value of {{code|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}} is set to ''renderbuffer''. All other state values of the attachment point specified by ''attachment'' are set to their default values. No change is made to the state of the renderbuuffer object and any previous attachment to the ''attachment'' logical buffer of the framebuffer ''target'' is broken.
+
The value of {{enum|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE}} for the specified attachment point is set to {{enum|GL_RENDERBUFFER}} and the value of {{enum|GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME}} is set to {{param|renderbuffer}}. All other state values of the attachment point specified by {{param|attachment}} are set to their default values. No change is made to the state of the renderbuuffer object and any previous attachment to the {{param|attachment}} logical buffer of the framebuffer {{param|target}} is broken.
  
Calling '''glFramebufferRenderbuffer''' with the renderbuffer name zero will detach the image, if any, identified by ''attachment'', in the framebuffer currently bound to ''target''. All state values of the attachment point specified by attachment in the object bound to target are set to their default values.
+
Calling '''glFramebufferRenderbuffer''' with the renderbuffer name zero will detach the image, if any, identified by {{param|attachment}}, in the framebuffer currently bound to {{param|target}}. All state values of the attachment point specified by attachment in the object bound to target are set to their default values.
  
Setting ''attachment'' to the value {{code|GL_DEPTH_STENCIL_ATTACHMENT}} is a special case causing both the depth and stencil attachments of the framebuffer object to be set to ''renderbuffer'', which should have the base internal format {{code|GL_DEPTH_STENCIL}}.
+
Setting {{param|attachment}} to the value {{enum|GL_DEPTH_STENCIL_ATTACHMENT}} is a special case causing both the depth and stencil attachments of the framebuffer object to be set to {{param|renderbuffer}}, which should have the base internal format {{enum|GL_DEPTH_STENCIL}}.
  
 
== Errors ==
 
== Errors ==
  
{{code|GL_INVALID_ENUM}} is generated if ''target'' is not one of the accepted tokens.
+
{{enum|GL_INVALID_ENUM}} is generated if {{param|target}} is not one of the accepted tokens.
  
{{code|GL_INVALID_ENUM}} is generated if ''renderbuffertarget'' is not {{code|GL_RENDERBUFFER}}.
+
{{enum|GL_INVALID_ENUM}} is generated if {{param|renderbuffertarget}} is not {{enum|GL_RENDERBUFFER}}.
  
{{code|GL_INVALID_OPERATION}} is generated if zero is bound to ''target''.
+
{{enum|GL_INVALID_OPERATION}} is generated if zero is bound to {{param|target}}.
  
 
== See Also ==
 
== See Also ==
  
[[GLAPI/glGenFramebuffers|glGenFramebuffers]], [[GLAPI/glBindFramebuffer|glBindFramebuffer]], [[GLAPI/glGenRenderbuffers|glGenRenderbuffers]], [[GLAPI/glFramebufferTexture|glFramebufferTexture]], [[GLAPI/glFramebufferTexture1D|glFramebufferTexture1D]], [[GLAPI/glFramebufferTexture2D|glFramebufferTexture2D]], [[GLAPI/glFramebufferTexture3D|glFramebufferTexture3D]]
+
{{apifunc|glBindFramebuffer}}, {{apifunc|glFramebufferTexture}}, {{apifunc|glFramebufferTextureLayer}}
  
 
== Copyright ==
 
== Copyright ==
Line 45: Line 45:
 
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|FramebufferRenderbuffer]]
+
[[Category:Core API Ref Framebuffer Objects|FramebufferRenderbuffer]]
 +
[[Category:Core API Reference|FramebufferRenderbuffer]]

Revision as of 21:45, 26 September 2012

glFramebufferRenderbuffer
Core in version 4.5
Core since version 3.0

glFramebufferRenderbuffer: attach a renderbuffer as a logical buffer to the currently bound framebuffer object

Function Definition

 GLsync glFramebufferRenderbuffer(GLenum target​, GLenum attachment​, GLenum renderbuffertarget​, GLuint renderbuffer​);
target
Specifies the framebuffer target. target​ must be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER, or GL_FRAMEBUFFER. GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER.
attachment
Specifies the attachment point of the framebuffer.
renderbuffertarget
Specifies the renderbuffer target and must be GL_RENDERBUFFER.
renderbuffer
Specifies the name of an existing renderbuffer object of type renderbuffertarget​ to attach.

Description

glFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the currently bound framebuffer object. renderbuffer​ is the name of the renderbuffer object to attach and must be either zero, or the name of an existing renderbuffer object of type renderbuffertarget​. If renderbuffer​ is not zero and if glFramebufferRenderbuffer is successful, then the renderbuffer name renderbuffer​ will be used as the logical buffer identified by attachment​ of the framebuffer currently bound to target​.

The value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE for the specified attachment point is set to GL_RENDERBUFFER and the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is set to renderbuffer​. All other state values of the attachment point specified by attachment​ are set to their default values. No change is made to the state of the renderbuuffer object and any previous attachment to the attachment​ logical buffer of the framebuffer target​ is broken.

Calling glFramebufferRenderbuffer with the renderbuffer name zero will detach the image, if any, identified by attachment​, in the framebuffer currently bound to target​. All state values of the attachment point specified by attachment in the object bound to target are set to their default values.

Setting attachment​ to the value GL_DEPTH_STENCIL_ATTACHMENT is a special case causing both the depth and stencil attachments of the framebuffer object to be set to renderbuffer​, which should have the base internal format GL_DEPTH_STENCIL.

Errors

GL_INVALID_ENUM is generated if target​ is not one of the accepted tokens.

GL_INVALID_ENUM is generated if renderbuffertarget​ is not GL_RENDERBUFFER.

GL_INVALID_OPERATION is generated if zero is bound to target​.

See Also

glBindFramebuffer, glFramebufferTexture, glFramebufferTextureLayer

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