GLFRAMEBUFFERRENDERB(3G)

    .SH "NAME" glFramebufferRenderbuffer - attach a renderbuffer as a logical buffer to the currently bound framebuffer object
    .SH "C SPECIFICATION"

            .HP u void glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);

    .SH "PARAMETERS"

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

            .RE
            .PP attachment

                        Specifies the attachment point of the framebuffer.

                .RE
                .PP renderbuffertarget

                            Specifies the renderbuffer target and must be GL_RENDERBUFFER.

                    .RE
                    .PP renderbuffer

                                Specifies the name of an existing renderbuffer object of type renderbuffertarget to attach.

                        .RE

                    .SH "DESCRIPTION"
                        .PP 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.
                        .PP 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.
                        .PP 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.
                        .PP 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.

                    .SH "ERRORS"
                        .PP GL_INVALID_ENUM is generated if target is not one of the accepted tokens.
                        .PP GL_INVALID_ENUM is generated if renderbuffertarget is not GL_RENDERBUFFER.
                        .PP GL_INVALID_OPERATION is generated if zero is bound to target.

                    .SH "API VERSION SUPPORT"

                        .TS allbox tab(:); l l l l l. T{ glFramebufferRenderbuffer T}:T{ T}:T{ T}:T{ T}:T{ T}

                    .SH "SEE ALSO"
                        .PP glGenFramebuffers(), glBindFramebuffer(), glGenRenderbuffers(), glFramebufferTexture(), glFramebufferTexture2D(), glFramebufferTextureLayer()

                    .SH "COPYRIGHT"
                        .PP Copyright © 2010-2015 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-2015 Khronos Group