'\" t .\" Title: glTexBuffer .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 01/03/2018 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLTEXBUFFER" "3G" "01/03/2018" "[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, glTextureBuffer \- attach a buffer object\*(Aqs data store to a buffer texture object .SH "C SPECIFICATION" .HP \w'void\ glTexBuffer('u .BI "void glTexBuffer(GLenum\ " "target" ", GLenum\ " "internalFormat" ", GLuint\ " "buffer" ");" .HP \w'void\ glTextureBuffer('u .BI "void glTextureBuffer(GLuint\ " "texture" ", GLenum\ " "internalformat" ", GLuint\ " "buffer" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target to which the texture is bound for \fBglTexBuffer\fR\&. Must be \fBGL_TEXTURE_BUFFER\fR\&. .RE .PP \fItexture\fR .RS 4 Specifies the texture object name for \fBglTextureBuffer\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 and \fBglTextureBuffer\fR attaches the data store of a specified buffer object to a specified texture object, and specify the storage format for the texture image found found in the buffer object\&. The texture object must be a buffer texture\&. .PP 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\&. .PP \fIinternalformat\fR specifies the storage format, and must be one of the following sized internal formats: .PP \fIinternalformat\fR specifies the storage format, and must be one of the following sized internal formats: .TS allbox tab(:); lB lB lB lB cB s s s lB lB lB lB cB cB cB cB. T{ \ \& T}:T{ \ \& T}:T{ \ \& T}:T{ \ \& T}:T{ \fB Component \fR T} 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& 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{ \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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 NO T}:T{ R T}:T{ G T}:T{ 0 T}:T{ 1 T} T{ \fBGL_RG16UI\fR T}:T{ ushort T}:T{ 2 T}:T{ NO T}:T{ R T}:T{ G T}:T{ 0 T}:T{ 1 T} T{ \fBGL_RG32UI\fR T}:T{ uint T}:T{ 2 T}:T{ NO T}:T{ R T}:T{ G T}:T{ 0 T}: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 $$ \eleft\elfloor { size \eover { components \etimes sizeof(base\e_type) } } \eright\erfloor $$ where $size$ is the size of the buffer object in basic machine units (the value of \fBGL_BUFFER_SIZE\fR for \fIbuffer\fR), and $components$ and $base\e_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 value of 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 by \fBglTexBuffer\fR if \fItarget\fR is not \fBGL_TEXTURE_BUFFER\fR\&. .PP \fBGL_INVALID_OPERATION\fR is generated by \fBglTextureBuffer\fR if \fItexture\fR is not the name of an existing texture object\&. .PP \fBGL_INVALID_ENUM\fR is generated by \fBglTextureBuffer\fR if the effective target of \fItexture\fR is not \fBGL_TEXTURE_BUFFER\fR\&. .PP \fBGL_INVALID_ENUM\fR is generated if \fIinternalformat\fR is not one of the sized internal formats described above\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fIbuffer\fR is not zero and is not the name of an existing buffer object\&. .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 "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{ \fBOpenGL Version\fR T} T{ \fBFunction / Feature Name\fR T}:T{ \fB2\&.0\fR T}:T{ \fB2\&.1\fR T}:T{ \fB3\&.0\fR T}:T{ \fB3\&.1\fR T}:T{ \fB3\&.2\fR T}:T{ \fB3\&.3\fR T}:T{ \fB4\&.0\fR T}:T{ \fB4\&.1\fR T}:T{ \fB4\&.2\fR T}:T{ \fB4\&.3\fR T}:T{ \fB4\&.4\fR T}:T{ \fB4\&.5\fR T} .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{ \fBglTexBuffer\fR 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{ \fBglTextureBuffer\fR 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} .TE .sp 1 .SH "SEE ALSO" .PP \fBglGenBuffers\fR(), \fBglBindBuffer\fR(), \fBglBufferData\fR(), \fBglDeleteBuffers\fR(), \fBglGenTextures\fR(), \fBglBindTexture\fR(), \fBglDeleteTextures\fR() .SH "COPYRIGHT" .PP Copyright \(co 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\&. \m[blue]\fBhttp://opencontent\&.org/openpub/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 2010-2014 Khronos Group .br