GLFRAMEBUFFERTEXTURE(3G)

    .SH "NAME" glFramebufferTexture - attach a level of a texture object as a logical buffer of a framebuffer object
    .SH "C SPECIFICATION"

            .HP u void glFramebufferTexture(GLenum target, GLenum attachment, GLuint texture, GLint level);

    .SH "PARAMETERS"

        .PP target

                    Specifies the target to which the framebuffer is bound.

            .RE
            .PP attachment

                        Specifies the attachment point of the framebuffer.

                .RE
                .PP texture

                            Specifies the name of an existing texture object to attach.

                    .RE
                    .PP level

                                Specifies the mipmap level of the texture object to attach.

                        .RE

                    .SH "DESCRIPTION"
                        .PP glFramebufferTexture attaches a selected mipmap level or image of a texture object as one of the logical buffers of the framebuffer object bound to the specified target. Textures cannot be attached to the default draw and read framebuffer, so they are not valid targets of these commands.
                        .PP 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 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 GL_COLOR_ATTACHMENTi may range from zero to the value of GL_MAX_COLOR_ATTACHMENTS minus one. Attaching a level of a texture to GL_DEPTH_STENCIL_ATTACHMENT is equivalent to attaching that level to both the GL_DEPTH_ATTACHMENT and the GL_STENCIL_ATTACHMENT attachment points simultaneously.
                        .PP If texture is non-zero, the specified level of the texture object named texture is attached to the framebuffer attachment point named by attachment.
                        .PP If texture is a multisampled texture, then level must be zero.
                        .PP If texture is a 3D texture, then level must be greater than or equal to zero and less than or equal to $log_2$ of the value of GL_MAX_3D_TEXTURE_SIZE.
                        .PP If texture is a cube-mapped texture, then level must be greater than or equal to zero and less than or equal to $log_2$ of the value of GL_MAX_CUBE_MAP_TEXTURE_SIZE.
                        .PP For all other texture types, level must be greater than or equal to zero and less than or equal to $log_2$ of the value of GL_MAX_TEXTURE_SIZE.
                        .PP If texture is the name of a three-dimensional, cube map array, cube map, two-dimensional array, or two-dimensional multisample array texture, the specified texture level is an array of images, and the framebuffer attachment is considered to be layered and GL_FRAMEBUFFER_ATTACHMENT_LAYERED is set to true.

                    .SH "ERRORS"
                        .PP GL_INVALID_ENUM is generated if target if it is not GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER, or GL_FRAMEBUFFER
                        .PP GL_INVALID_OPERATION is generated if zero is bound to target.
                        .PP GL_INVALID_ENUM is generated if attachment is not one of the accepted attachment points.
                        .PP GL_INVALID_VALUE is generated if texture is not zero or the name of an existing texture object.
                        .PP GL_INVALID_VALUE is generated if texture is not zero and level is not a supported texture level for texture.
                        .PP GL_INVALID_OPERATION is generated by if texture is a buffer texture.

                    .SH "VERSION SUPPORT"
                        .TS allbox tab(:); l l l l l. T{ glFramebufferTexture T}:T{ T}:T{ T}:T{ T}:T{ T}

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

                    .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