GLFRAMEBUFFERRENDERB(3G)

    .SH "NAME" glFramebufferRenderbuffer, glNamedFramebufferRenderbuffer - attach a renderbuffer as a logical buffer of a framebuffer object
    .SH "C SPECIFICATION"

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

    .SH "PARAMETERS"

        .PP target

                    Specifies the target to which the framebuffer is bound for glFramebufferRenderbuffer.

            .RE
            .PP framebuffer

                        Specifies the name of the framebuffer object for glNamedFramebufferRenderbuffer.

                .RE
                .PP attachment

                            Specifies the attachment point of the framebuffer.

                    .RE
                    .PP renderbuffertarget

                                Specifies the renderbuffer target. 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 and glNamedFramebufferRenderbuffer attaches a renderbuffer as one of the logical buffers of the specified framebuffer object. Renderbuffers cannot be attached to the default draw and read framebuffer, so they are not valid targets of these commands.
                            .PP For glFramebufferRenderbuffer, the framebuffer object is that bound to target, which must be GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER. GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER.
                            .PP For glNamedFramebufferRenderbuffer, framebuffer is the name of the framebuffer object.
                            .PP renderbuffertarget must be GL_RENDERBUFFER.
                            .PP 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.
                            .PP 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. i in 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.
                            .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 specified attachment point 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 specified framebuffer object is broken.
                            .PP 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.

                        .SH "ERRORS"
                            .PP GL_INVALID_ENUM is generated by glFramebufferRenderbuffer if target is not one of the accepted framebuffer targets.
                            .PP GL_INVALID_OPERATION is generated by glFramebufferRenderbuffer if zero is bound to target.
                            .PP GL_INVALID_OPERATION is generated by glNamedFramebufferRenderbuffer if framebuffer is not the name of an existing framebuffer object.
                            .PP GL_INVALID_ENUM is generated if attachment is not one of the accepted attachment points.
                            .PP GL_INVALID_ENUM is generated if renderbuffertarget is not GL_RENDERBUFFER.
                            .PP GL_INVALID_OPERATION is generated if renderbuffertarget is not zero or the name of an existing renderbuffer object of type GL_RENDERBUFFER.

                        .SH "VERSION SUPPORT"
                            .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ OpenGL Version T} T{ Function / Feature Name T}:T{ 2.0 T}:T{ 2.1 T}:T{ 3.0 T}:T{ 3.1 T}:T{ 3.2 T}:T{ 3.3 T}:T{ 4.0 T}:T{ 4.1 T}:T{ 4.2 T}:T{ 4.3 T}:T{ 4.4 T}:T{ 4.5 T} l c c c c c c c c c c c c l c c c c c c c c c c c c. T{ glFramebufferRenderbuffer T}:T{ - T}:T{ - T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T} T{ glNamedFramebufferRenderbuffer T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ - T}:T{ ✔ T}

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

                        .SH "COPYRIGHT"
                            .PP 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. https://opencontent.org/openpub/.

COPYRIGHT
Copyright © 2010-2014 Khronos Group