Gl.FramebufferRenderbufferEXT (gb.opengl)

Static Sub FramebufferRenderbufferEXT ( Target As Integer, Attachment As Integer, RenderbufferTarget As Integer, Renderbuffer As Integer )

Attach a renderbuffer as a logical buffer to the currently bound framebuffer object.

Parameters

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

Gl.FramebufferRenderbuffer 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 Gl.FramebufferRenderbuffer 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 Gl.FramebufferRenderbuffer 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

Gl.GenFramebuffers Gl.BindFramebuffer Gl.GenRenderbuffers Gl.FramebufferTexture Gl.FramebufferTexture1D Gl.FramebufferTexture2D Gl.FramebufferTexture3D

See original documentation on OpenGL website