'\" t .\" Title: glGetFramebufferAttachmentParameteriv .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.76.1 .\" Date: 05/30/2012 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLGETFRAMEBUFFERATTA" "3G" "05/30/2012" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" glGetFramebufferAttachmentParameteriv \- retrieve information about attachments of a bound framebuffer object .SH "C SPECIFICATION" .HP \w'void\ glGetFramebufferAttachmentParameter('u .BI "void glGetFramebufferAttachmentParameter(GLenum\ " "target" ", GLenum\ " "attachment" ", GLenum\ " "pname" ", GLint\ *" "params" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target of the query operation\&. .RE .PP \fIattachment\fR .RS 4 Specifies the attachment within \fItarget\fR .RE .PP \fIpname\fR .RS 4 Specifies the parameter of \fIattachment\fR to query\&. .RE .PP \fIparams\fR .RS 4 Specifies the address of a variable receive the value of \fIpname\fR for \fIattachment\fR\&. .RE .SH "DESCRIPTION" .PP \fBglGetFramebufferAttachmentParameter\fR returns information about attachments of a bound framebuffer object\&. \fItarget\fR specifies the framebuffer binding point and must be \fBGL_DRAW_FRAMEBUFFER\fR, \fBGL_READ_FRAMEBUFFER\fR or \fBGL_FRAMEBUFFER\fR\&. \fBGL_FRAMEBUFFER\fR is equivalent to \fBGL_DRAW_FRAMEBUFFER\fR\&. .PP If the default framebuffer is bound to \fItarget\fR then \fIattachment\fR must be one of \fBGL_FRONT_LEFT\fR, \fBGL_FRONT_RIGHT\fR, \fBGL_BACK_LEFT\fR, or \fBGL_BACK_RIGHT\fR, identifying a color buffer, \fBGL_DEPTH\fR, identifying the depth buffer, or \fBGL_STENCIL\fR, identifying the stencil buffer\&. .PP If a framebuffer object is bound, then \fIattachment\fR must be one of \fBGL_COLOR_ATTACHMENT\fR\fB\fIi\fR\fR, \fBGL_DEPTH_ATTACHMENT\fR, \fBGL_STENCIL_ATTACHMENT\fR, or \fBGL_DEPTH_STENCIL_ATTACHMENT\fR\&. \fIi\fR in \fBGL_COLOR_ATTACHMENT\fR\fB\fIi\fR\fR must be in the range zero to the value of \fBGL_MAX_COLOR_ATTACHMENTS\fR \- 1\&. .PP If \fIattachment\fR is \fBGL_DEPTH_STENCIL_ATTACHMENT\fR and different objects are bound to the depth and stencil attachment points of \fItarget\fR the query will fail\&. If the same object is bound to both attachment points, information about that object will be returned\&. .PP Upon successful return from \fBglGetFramebufferAttachmentParameteriv\fR, if \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\fR, then \fIparams\fR will contain one of \fBGL_NONE\fR, \fBGL_FRAMEBUFFER_DEFAULT\fR, \fBGL_TEXTURE\fR, or \fBGL_RENDERBUFFER\fR, identifying the type of object which contains the attached image\&. Other values accepted for \fIpname\fR depend on the type of object, as described below\&. .PP If the value of \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\fR is \fBGL_NONE\fR, no framebuffer is bound to \fItarget\fR\&. In this case querying \fIpname\fR \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\fR will return zero, and all other queries will generate an error\&. .PP If the value of \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\fR is not \fBGL_NONE\fR, these queries apply to all other framebuffer types: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_RED_SIZE\fR, \fBGL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE\fR, \fBGL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE\fR, \fBGL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE\fR, \fBGL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE\fR, or \fBGL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE\fR, then \fIparams\fR will contain the number of bits in the corresponding red, green, blue, alpha, depth, or stencil component of the specified attachment\&. Zero is returned if the requested component is not present in \fIattachment\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE\fR, \fIparams\fR will contain the format of components of the specified attachment, one of \fBGL_FLOAT\fR, \fIGL_INT\fR, \fIGL_UNSIGNED_INT\fR, \fIGL_SIGNED_NORMALIZED\fR, or \fIGL_UNSIGNED_NORMALIZED\fR 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\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING\fR, \fIparam\fR will contain the encoding of components of the specified attachment, one of \fBGL_LINEAR\fR or \fBGL_SRGB\fR for linear or sRGB\-encoded components, respectively\&. Only color buffer components may be sRGB\-encoded; such components are treated as described in sections 4\&.1\&.7 and 4\&.1\&.8\&. For the 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\&. .RE .PP If the value of \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\fR is \fBGL_RENDERBUFFER\fR, then: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\fR, \fIparams\fR will contain the name of the renderbuffer object which contains the attached image\&. .RE .PP If the value of \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\fR is \fBGL_TEXTURE\fR, then: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\fR, then \fIparams\fR will contain the name of the texture object which contains the attached image\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL\fR, then \fIparams\fR will contain the mipmap level of the texture object which contains the attached image\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE\fR and the texture object named \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\fR is a cube map texture, then \fIparams\fR will contain the cube map face of the cubemap texture object which contains the attached image\&. Otherwise \fIparams\fR will contain the value zero\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER\fR and the texture object named \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\fR is a layer of a three\-dimensional texture or a one\-or two\-dimensional array texture, then \fIparams\fR will contain the number of the texture layer which contains the attached image\&. Otherwise \fIparams\fR will contain the value zero\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If \fIpname\fR is \fBGL_FRAMEBUFFER_ATTACHMENT_LAYERED\fR, then \fIparams\fR will contain \fBGL_TRUE\fR if an entire level of a three\-dimesional texture, cube map texture, or one\-or two\-dimensional array texture is attached\&. Otherwise, \fIparams\fR will contain \fBGL_FALSE\fR\&. .RE .PP Any combinations of framebuffer type and \fIpname\fR not described above will generate an error\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fItarget\fR is not one of the accepted tokens\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIpname\fR is not valid for the value of \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIattachment\fR is not the accepted values for \fItarget\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIattachment\fR is \fBGL_DEPTH_STENCIL_ATTACHMENT\fR and different objects are bound to the depth and stencil attachment points of \fItarget\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if the value of \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE\fR is \fBGL_NONE\fR and \fIpname\fR is not \fBGL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME\fR\&. .SH "SEE ALSO" .PP \fBglGenFramebuffers\fR(), \fBglBindFramebuffer\fR() .SH "COPYRIGHT" .PP Copyright \(co 2010 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\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&.