glGetFramebufferAttachmentParameteriv Function

Syntax

GL_APICALL void GL_APIENTRY glGetFramebufferAttachmentParameteriv(
     GLenum target,
     GLenum attachment,
     GLenum pname,
     GLint * params
);

Parameters

Name Description
in target Target framebuffer object
in attachment Name of the attachment point for the parameter to get
in pname Name of the parameter to get
out params Region storing the obtained parameters

Return Values

No values are returned.

Description

Gets attachment parameters for a framebuffer object.

Set target to GL_FRAMEBUFFER.

Set attachment to one of the following values.

GL_COLOR_ATTACHMENT0Gets color buffer parameters.
GL_DEPTH_ATTACHMENTGet depth buffer parameters.
GL_DEPTH_STENCIL_ATTACHMENTGets both depth buffer and stencil buffer parameters.

Set pname to one of the following values.

GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPEGets the attached object type.
GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAMEGets the attached object name.
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVELIf there is an attached texture, gets its mipmap level.
GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACEIf there is an attached cube-map texture, gets its cube map face.

This function generates the following errors.

GL_INVALID_ENUMThe target, attachment, or pname argument was set to an invalid value.
GL_INVALID_ENUMThe pname argument was set to GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL or GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE for an attachment point with a render buffer attached.
GL_INVALID_ENUMNo object has been attached to attachment, and pname is not GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL