'\" t .\" Title: glFramebufferTexture .\" 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 "GLFRAMEBUFFERTEXTURE" "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" glFramebufferTexture \- attach a level of a texture object as a logical buffer to the currently bound framebuffer object .SH "C SPECIFICATION" .HP \w'void\ glFramebufferTexture('u .BI "void glFramebufferTexture(GLenum\ " "target" ", GLenum\ " "attachment" ", GLuint\ " "texture" ", GLint\ " "level" ");" .HP \w'void\ glFramebufferTexture1D('u .BI "void glFramebufferTexture1D(GLenum\ " "target" ", GLenum\ " "attachment" ", GLenum\ " "textarget" ", GLuint\ " "texture" ", GLint\ " "level" ");" .HP \w'void\ glFramebufferTexture2D('u .BI "void glFramebufferTexture2D(GLenum\ " "target" ", GLenum\ " "attachment" ", GLenum\ " "textarget" ", GLuint\ " "texture" ", GLint\ " "level" ");" .HP \w'void\ glFramebufferTexture3D('u .BI "void glFramebufferTexture3D(GLenum\ " "target" ", GLenum\ " "attachment" ", GLenum\ " "textarget" ", GLuint\ " "texture" ", GLint\ " "level" ", GLint\ " "layer" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the framebuffer target\&. \fItarget\fR must be \fBGL_DRAW_FRAMEBUFFER\fR, \fBGL_READ_FRAMEBUFFER\fR, or \fBGL_FRAMEBUFFER\fR\&. \fBGL_FRAMEBUFFER\fR is equivalent to \fBGL_DRAW_FRAMEBUFFER\fR\&. .RE .PP \fIattachment\fR .RS 4 Specifies the attachment point of the framebuffer\&. \fIattachment\fR must be \fBGL_COLOR_ATTACHMENT\fR\fB\fIi\fR\fR, \fBGL_DEPTH_ATTACHMENT\fR, \fBGL_STENCIL_ATTACHMENT\fR or \fBGL_DEPTH_STENCIL_ATTACHMMENT\fR\&. .RE .PP \fItextarget\fR .RS 4 For \fBglFramebufferTexture1D\fR, \fBglFramebufferTexture2D\fR and \fBglFramebufferTexture3D\fR, specifies what type of texture is expected in the \fItexture\fR parameter, or for cube map textures, which face is to be attached\&. .RE .PP \fItexture\fR .RS 4 Specifies the texture object to attach to the framebuffer attachment point named by \fIattachment\fR\&. .RE .PP \fIlevel\fR .RS 4 Specifies the mipmap level of \fItexture\fR to attach\&. .RE .SH "DESCRIPTION" .PP \fBglFramebufferTexture\fR, \fBglFramebufferTexture1D\fR, \fBglFramebufferTexture2D\fR, and \fBglFramebufferTexture\fR attach a selected mipmap level or image of a texture object as one of the logical buffers of the framebuffer object currently bound to \fItarget\fR\&. \fItarget\fR 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 \fIattachment\fR specifies the logical attachment of the framebuffer and must be \fBGL_COLOR_ATTACHMENT\fR\fB\fIi\fR\fR, \fBGL_DEPTH_ATTACHMENT\fR, \fBGL_STENCIL_ATTACHMENT\fR or \fBGL_DEPTH_STENCIL_ATTACHMMENT\fR\&. \fIi\fR in \fBGL_COLOR_ATTACHMENT\fR\fB\fIi\fR\fR may range from zero to the value of \fBGL_MAX_COLOR_ATTACHMENTS\fR \- 1\&. Attaching a level of a texture to \fBGL_DEPTH_STENCIL_ATTACHMENT\fR is equivalent to attaching that level to both the \fBGL_DEPTH_ATTACHMENT\fR \fIand\fR the \fBGL_STENCIL_ATTACHMENT\fR attachment points simultaneously\&. .PP \fItextarget\fR specifies what type of texture is named by \fItexture\fR, and for cube map textures, specifies the face that is to be attached\&. If \fItexture\fR is not zero, it must be the name of an existing texture with type \fItextarget\fR, unless it is a cube map texture, in which case \fItextarget\fR must be \fBGL_TEXTURE_CUBE_MAP_POSITIVE_X\fR \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Z\fR, or \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR\&. .PP If \fItexture\fR is non\-zero, the specified \fIlevel\fR of the texture object named \fItexture\fR is attached to the framebfufer attachment point named by \fIattachment\fR\&. For \fBglFramebufferTexture1D\fR, \fBglFramebufferTexture2D\fR, and \fBglFramebufferTexture3D\fR, \fItexture\fR must be zero or the name of an existing texture with a target of \fItextarget\fR, or \fItexture\fR must be the name of an existing cube\-map texture and \fItextarget\fR must be one of \fBGL_TEXTURE_CUBE_MAP_POSITIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Z\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Y\fR, or \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR\&. .PP If \fItextarget\fR is \fBGL_TEXTURE_RECTANGLE\fR, \fBGL_TEXTURE_2D_MULTISAMPLE\fR, or \fBGL_TEXTURE_2D_MULTISAMPLE_ARRAY\fR, then \fIlevel\fR must be zero\&. If \fItextarget\fR is \fBGL_TEXTURE_3D\fR, then level must be greater than or equal to zero and less than or equal to log2 of the value of \fBGL_MAX_3D_TEXTURE_SIZE\fR\&. If \fItextarget\fR is one of \fBGL_TEXTURE_CUBE_MAP_POSITIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Z\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Y\fR, or \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR, then \fIlevel\fR must be greater than or equal to zero and less than or equal to log2 of the value of \fBGL_MAX_CUBE_MAP_TEXTURE_SIZE\fR\&. For all other values of \fItextarget\fR, \fIlevel\fR must be greater than or equal to zero and no larger than log2 of the value of \fBGL_MAX_TEXTURE_SIZE\fR\&. .PP \fIlayer\fR specifies the layer of a 2\-dimensional image within a 3\-dimensional texture\&. .PP For \fBglFramebufferTexture1D\fR, if \fItexture\fR is not zero, then \fItextarget\fR must be \fBGL_TEXTURE_1D\fR\&. For \fBglFramebufferTexture2D\fR, if \fItexture\fR is not zero, \fItextarget\fR must be one of \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_RECTANGLE\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_POSITIVE_Z\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_X\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Y\fR, \fBGL_TEXTURE_CUBE_MAP_NEGATIVE_Z\fR, or \fBGL_TEXTURE_2D_MULTISAMPLE\fR\&. For \fBglFramebufferTexture3D\fR, if \fItexture\fR is not zero, then \fItextarget\fR must be \fBGL_TEXTURE_3D\fR\&. .SH "NOTES" .PP \fBglFramebufferTexture\fR is available only if the GL version is 3\&.2 or greater\&. .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 \fIrenderbuffertarget\fR is not \fBGL_RENDERBUFFER\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if zero is bound to \fItarget\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItextarget\fR and \fItexture\fR are not compatible\&. .SH "SEE ALSO" .PP \fBglGenFramebuffers\fR(), \fBglBindFramebuffer\fR(), \fBglGenRenderbuffers\fR(), \fBglFramebufferTexture\fR(), \fBglFramebufferTexture1D\fR(), \fBglFramebufferTexture2D\fR(), \fBglFramebufferTexture3D\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[]\&.