GLGETFRAMEBUFFERATTA(3G)

    .SH "NAME" glGetFramebufferAttachmentParameteriv, glGetNamedFramebufferAttachmentParameteriv - retrieve information about attachments of a framebuffer object
    .SH "C SPECIFICATION"

            .HP u void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint *params);
            .HP u void glGetNamedFramebufferAttachmentParameteriv(GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);

    .SH "PARAMETERS"

        .PP target

                    Specifies the target to which the framebuffer object is bound for glGetFramebufferAttachmentParameteriv.

            .RE
            .PP framebuffer

                        Specifies the name of the framebuffer object for glGetNamedFramebufferAttachmentParameteriv.

                .RE
                .PP attachment

                            Specifies the attachment of the framebuffer object to query.

                    .RE
                    .PP pname

                                Specifies the parameter of attachment to query.

                        .RE
                        .PP params

                                    Returns the value of parameter pname for attachment.

                            .RE

                        .SH "DESCRIPTION"
                            .PP glGetFramebufferAttachmentParameteriv and glGetNamedFramebufferAttachmentParameteriv return parameters of attachments of a specified framebuffer object.
                            .PP For glGetFramebufferAttachmentParameteriv, the framebuffer object is that bound to target, which must be one of GL_DRAW_FRAMEBUFFER, GL_READ_FRAMEBUFFER or GL_FRAMEBUFFER. GL_FRAMEBUFFER is equivalent to GL_DRAW_FRAMEBUFFER. Buffers of default framebuffers may also be queried if bound to target.
                            .PP For glGetNamedFramebufferAttachmentParameteriv, framebuffer is the name of the framebuffer object. If framebuffer is zero, the default draw framebuffer is queried.
                            .PP If the specified framebuffer is a framebuffer object, attachment must be one of GL_DEPTH_ATTACHMENT, GL_STENCIL_ATTACHMENT GL_DEPTH_STENCIL_ATTACHMENT, or GL_COLOR_ATTACHMENTi, where i is between zero and the value of GL_MAX_COLOR_ATTACHMENTS minus one.
                            .PP If the specified framebuffer is a default framebuffer, target, attachment must be one of GL_FRONT_LEFT, GL_FRONT_RIGHT, GL_BACK_LEFT, GL_BACK_RIGHT, GL_DEPTH or GL_STENCIL, identifying the corresponding buffer.
                            .PP If attachment is GL_DEPTH_STENCIL_ATTACHMENT, the same object must be bound to both the depth and stencil attachment points of the framebuffer object, and information about that object is returned.
                            .PP Upon successful return, if pname is GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, then params will contain one of GL_NONE, GL_FRAMEBUFFER_DEFAULT, GL_TEXTURE, or GL_RENDERBUFFER, identifying the type of object which contains the attached image. Other values accepted for pname depend on the type of object, as described below.
                            .PP If the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is GL_NONE, then either no framebuffer is bound to target; or a default framebuffer is queried, attachment is GL_DEPTH or GL_STENCIL, and the number of depth or stencil bits, respectively, is zero. In this case querying pname GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME will return zero, and all other queries will generate an error.
                            .PP If the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is not GL_NONE, these queries apply to all other framebuffer types:

                        •
                                        If pname is GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE, GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE, GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE, GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE, GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE or GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE, then params will contain the number of bits in the corresponding red, green, blue, alpha, depth, or stencil component of the specified attachment. If the requested component is not present in the attachment, or if no data storage or texture image has been specified for the attachment, then params will contain zero.
                                    .RE

                            •
                                            If pname is GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE, then params will contain the format of components of the specified attachment, one of GL_FLOAT, GL_INT, GL_UNSIGNED_INT, GL_SIGNED_NORMALIZED, or GL_UNSIGNED_NORMALIZED for floating-point, signed integer, unsigned integer, signed normalized fixed-point, or unsigned normalized fixed-point components respectively. Only color buffers may have integer components. If no data storage or texture image has been specified for the attachment, then params will contain GL_NONE. This query cannot be performed for a combined depth+stencil attachment, since it does not have a single format.
                                        .RE

                                •
                                                If pname is GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING, then params will contain the encoding of components of the specified attachment, one of GL_LINEAR or GL_SRGB for linear or sRGB-encoded components, respectively. Only color buffer components may be sRGB-encoded; such components are treated as described in the OpenGL Specification. For a default framebuffer, color encoding is determined by the implementation. For framebuffer objects, components are sRGB-encoded if the internal format of a color attachment is one of the color-renderable SRGB formats. If the attachment is not a color attachment, or if no data storage or texture image has been specified for the attachment, then params will contain GL_LINEAR.
                                            .RE
                                        .PP If the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is GL_RENDERBUFFER, then

                                    •
                                                    If pname is GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, params will contain the name of the renderbuffer object which contains the attached image.
                                                .RE
                                            .PP If the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is GL_TEXTURE, then

                                        •
                                                        If pname is GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME, then params will contain the name of the texture object which contains the attached image.
                                                    .RE

                                            •
                                                            If pname is GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL, then params will contain the mipmap level of the texture object which contains the attached image.
                                                        .RE

                                                •
                                                                If pname is GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE and the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is the name of a cube map texture object, then params will contain the cube map face of the cubemap texture object which contains the attached image. Otherwise params will contain zero.
                                                            .RE

                                                    •
                                                                    If pname is GL_FRAMEBUFFER_ATTACHMENT_LAYERED, then params will contain GL_TRUE if an entire level of a three-dimensional texture, cube map texture, or one-or two-dimensional array texture is attached. Otherwise, params will contain GL_FALSE.
                                                                .RE

                                                        •
                                                                        If pname is GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER; the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME is the name of a three-dimensional, or a one- or two-dimensional array texture; and the value of GL_FRAMEBUFFER_ATTACHMENT_LAYERED is GL_FALSE, then params will contain the texture layer which contains the attached image. Otherwise params will contain zero.
                                                                    .RE

                                                            .SH "NOTES"
                                                                .PP The GL_FRAMEBUFFER_ATTACHMENT_LAYERED query is supported only if the GL version is 3.2 or greater.

                                                            .SH "ERRORS"
                                                                .PP GL_INVALID_ENUM is generated by glGetFramebufferAttachmentParameteriv if target is not one of the accepted framebuffer targets.
                                                                .PP GL_INVALID_OPERATION is generated by glGetNamedFramebufferAttachmentParameteriv if framebuffer is not zero or the name of an existing framebuffer object.
                                                                .PP GL_INVALID_ENUM is generated if pname is not valid for the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE, as described above.
                                                                .PP GL_INVALID_OPERATION is generated if attachment is not one of the accepted framebuffer attachment points, as described above.
                                                                .PP GL_INVALID_OPERATION is generated if the value of GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE is GL_NONE and pname is not GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME or GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.
                                                                .PP GL_INVALID_OPERATION is generated if attachment is GL_DEPTH_STENCIL_ATTACHMENT and different objects are bound to the depth and stencil attachment points of target.
                                                                .PP GL_INVALID_OPERATION is generated if attachment is GL_DEPTH_STENCIL_ATTACHMENT and pname is GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE.

                                                            .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{ glGetFramebufferAttachmentParameteriv 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{ glGetNamedFramebufferAttachmentParameteriv 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() glGetFramebufferParameter()

                                                            .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