GLFRAMEBUFFERRENDERB(3G)
πΈ NAME
okay bestie, welcome to the glFramebufferRenderbuffer page from manual GLFRAMEBUFFERRENDERB(3G) β and yes, it's giving βattach a renderbuffer as a logical buffer of a framebuffer object.β The two stars are glFramebufferRenderbuffer and glNamedFramebufferRenderbuffer, and they're both iconic in their own way π
π C SPECIFICATION
no cap, here's the exact signature receipt:
void glFramebufferRenderbuffer(GLenum target, GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer);
void glNamedFramebufferRenderbuffer(GLuint framebuffer,
GLenum attachment,
GLenum renderbuffertarget,
GLuint renderbuffer);
π PARAMETERS
targetβ specifies the target to which the framebuffer is bound forglFramebufferRenderbuffer.framebufferβ specifies the name of the framebuffer object forglNamedFramebufferRenderbuffer.attachmentβ specifies the attachment point of the framebuffer.renderbuffertargetβ specifies the renderbuffer target. Must beGL_RENDERBUFFER.renderbufferβ specifies the name of an existing renderbuffer object of typerenderbuffertargetto attach.
β¨ DESCRIPTION
okay so both glFramebufferRenderbuffer and glNamedFramebufferRenderbuffer attach a renderbuffer as one of the logical buffers of the specified framebuffer object. Big important vibe check: renderbuffers cannot be attached to the default draw and read framebuffer, so they are not valid targets of these commands π«Ά
For glFramebufferRenderbuffer, the framebuffer object is the one bound to target, which must be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER, or GL_FRAMEBUFFER. GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER, periodt.
For glNamedFramebufferRenderbuffer, framebuffer is the name of the framebuffer object.
renderbuffertarget must be GL_RENDERBUFFER.
renderbuffer must be zero or the name of an existing renderbuffer object of type renderbuffertarget. If renderbuffer is not zero, then the specified renderbuffer will be used as the logical buffer identified by attachment of the specified framebuffer object. If renderbuffer is zero, then the value of renderbuffertarget is ignored.
attachment specifies the logical attachment of the framebuffer and must be GL_COLOR_ATTACHMENTi, GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT, or GL_DEPTH_STENCIL_ATTACHMENT. The i in GL_COLOR_ATTACHMENTi may range from zero to the value of GL_MAX_COLOR_ATTACHMENTS minus one. Setting attachment to the value GL_DEPTH_STENCIL_ATTACHMENT is a special case causing both the depth and stencil attachments of the specified framebuffer object to be set to renderbuffer, which should have the base internal format GL_DEPTH_STENCIL.
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 specified attachment point are set to their default values. No change is made to the state of the renderbuffer object, and any previous attachment to the attachment logical buffer of the specified framebuffer object is broken.
If renderbuffer is zero, these commands will detach the image, if any, identified by the specified attachment point of the specified framebuffer object. All state values of the attachment point are set to their default values.
π¨ ERRORS
GL_INVALID_ENUMβ generated byglFramebufferRenderbufferiftargetis not one of the accepted framebuffer targets.GL_INVALID_OPERATIONβ generated byglFramebufferRenderbufferif zero is bound totarget.GL_INVALID_OPERATIONβ generated byglNamedFramebufferRenderbufferifframebufferis not the name of an existing framebuffer object.GL_INVALID_ENUMβ generated ifattachmentis not one of the accepted attachment points.GL_INVALID_ENUMβ generated ifrenderbuffertargetis notGL_RENDERBUFFER.GL_INVALID_OPERATIONβ generated ifrenderbuffertargetis not zero or the name of an existing renderbuffer object of typeGL_RENDERBUFFER.
π¦ VERSION SUPPORT
the table columns are Function / Feature Name and OpenGL Version, with versions 2.0, 2.1, 3.0, 3.1, 3.2, 3.3, 4.0, 4.1, 4.2, 4.3, 4.4, and 4.5. here's the support vibe check β¨
glFramebufferRenderbuffer2.0:-2.1:-3.0:β3.1:β3.2:β3.3:β4.0:β4.1:β4.2:β4.3:β4.4:β4.5:β
glNamedFramebufferRenderbuffer2.0:-2.1:-3.0:-3.1:-3.2:-3.3:-4.0:-4.1:-4.2:-4.3:-4.4:-4.5:β
π₯ SEE ALSO
glGenFramebuffers()glBindFramebuffer()glGenRenderbuffers()glFramebufferTexture()glFramebufferTexture1DglFramebufferTexture2DglFramebufferTexture3D
π COPYRIGHT
Copyright Β© 2010-2014 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/.
π COPYRIGHT
Copyright Β© 2010-2014 Khronos Group
mwah π this page came from [FIXME: source], dated 08/09/2021, and it's the GLFRAMEBUFFERRENDERB(3G) manual β slay and goodbye bestie π«Ά
π¦ where this page comes from
- centos-stream 9: gl-manpages 1.1-24.20190306.el9 Β· MIT and Open Publication
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms