'\" t .\" Title: glTexBuffer .\" 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 "GLTEXBUFFER" "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" glTexBuffer \- attach the storage for a buffer object to the active buffer texture .SH "C SPECIFICATION" .HP \w'void\ glTexBuffer('u .BI "void glTexBuffer(GLenum\ " "target" ", GLenum\ " "internalFormat" ", Gluint" "buffer" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target of the operation and must be \fBGL_TEXTURE_BUFFER\fR\&. .RE .PP \fIinternalFormat\fR .RS 4 Specifies the internal format of the data in the store belonging to \fIbuffer\fR\&. .RE .PP \fIbuffer\fR .RS 4 Specifies the name of the buffer object whose storage to attach to the active buffer texture\&. .RE .SH "DESCRIPTION" .PP \fBglTexBuffer\fR attaches the storage for the buffer object named \fIbuffer\fR to the active buffer texture, and specifies the internal format for the texel array found in the attached buffer object\&. If \fIbuffer\fR is zero, any buffer object attached to the buffer texture is detached and no new buffer object is attached\&. If \fIbuffer\fR is non\-zero, it must be the name of an existing buffer object\&. \fItarget\fR must be \fBGL_TEXTURE_BUFFER\fR\&. \fIinternalformat\fR specifies the storage format, and must be one of the following sized internal formats: .TS allbox tab(:); cB cB cB cB lB s s s ^ ^ ^ ^. T{ \ \& T}:T{ \ \& T}:T{ \ \& T}:T{ \ \& T}:T{ \fB Component \fR T} ::: .T& l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c l l l l c c c c. T{ \fBSized Internal Format\fR T}:T{ \fBBase Type\fR T}:T{ \fBComponents\fR T}:T{ \fBNorm\fR T}:T{ 0 T}:T{ 1 T}:T{ 2 T}:T{ 3 T} T{ \fBGL_R8\fR T}:T{ ubyte T}:T{ 1 T}:T{ YES T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R16\fR T}:T{ ushort T}:T{ 1 T}:T{ YES T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R16F\fR T}:T{ half T}:T{ 1 T}:T{ NO T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R32F\fR T}:T{ float T}:T{ 1 T}:T{ NO T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R8I\fR T}:T{ byte T}:T{ 1 T}:T{ NO T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R16I\fR T}:T{ short T}:T{ 1 T}:T{ NO T}:T{ R T}:T{ 0 T}:T{ 0 T}:T{ 1 T} T{ \fBGL_R32I\fR T}:T{ int T}:T{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}:T{ 1 T} T{ \fBGL_RGB32F\fR T}:T{ float T}:T{ 3 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ 1 T} T{ \fBGL_RGB32I\fR T}:T{ int T}:T{ 3 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ 1 T} T{ \fBGL_RGB32UI\fR T}:T{ uint T}:T{ 3 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ 1 T} T{ \fBGL_RGBA8\fR T}:T{ uint T}:T{ 4 T}:T{ YES T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16\fR T}:T{ short T}:T{ 4 T}:T{ YES T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16F\fR T}:T{ half T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA32F\fR T}:T{ float T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA8I\fR T}:T{ byte T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16I\fR T}:T{ short T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA32I\fR T}:T{ int T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA8UI\fR T}:T{ ubyte T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA16UI\fR T}:T{ ushort T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} T{ \fBGL_RGBA32UI\fR T}:T{ uint T}:T{ 4 T}:T{ NO T}:T{ R T}:T{ G T}:T{ B T}:T{ A T} .TE .sp 1 .PP When a buffer object is attached to a buffer texture, the buffer object\*(Aqs data store is taken as the texture\*(Aqs texel array\&. The number of texels in the buffer texture\*(Aqs texel array is given by buffer_size components \(mu sizeof(base_type) .PP where \fIbuffer_size\fR is the size of the buffer object, in basic machine units and components and base type are the element count and base data type for elements, as specified in the table above\&. The number of texels in the texel array is then clamped to the implementation\-dependent limit \fBGL_MAX_TEXTURE_BUFFER_SIZE\fR\&. When a buffer texture is accessed in a shader, the results of a texel fetch are undefined if the specified texel coordinate is negative, or greater than or equal to the clamped number of texels in the texel array\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fItarget\fR is not \fBGL_TEXTURE_BUFFER\fR\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIinternalFormat\fR is not one of the accepted tokens\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIbuffer\fR is not zero or the name of an existing buffer object\&. .SH "NOTES" .PP \fBglTexBuffer\fR is available only if the GL version is 3\&.1 or greater\&. .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with argument \fBGL_MAX_TEXTURE_BUFFER_SIZE\fR .PP \fBglGet\fR() with argument \fBGL_TEXTURE_BINDING_BUFFER\fR .PP \fBglGetTexLevelParameter\fR() with argument \fBGL_TEXTURE_BUFFER_DATA_STORE_BINDING\fR .SH "SEE ALSO" .PP \fBglGenBuffers\fR(), \fBglBindBuffer\fR(), \fBglBufferData\fR(), \fBglDeleteBuffers\fR(), \fBglGenTextures\fR(), \fBglBindTexture\fR(), \fBglDeleteTextures\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[]\&.