'\" t .\" Title: glBindTextures .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 05/21/2015 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "GLBINDTEXTURES" "3G" "05/21/2015" "[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" glBindTextures \- bind one or more named textures to a sequence of consecutive texture units .SH "C SPECIFICATION" .HP \w'void\ glBindTextures('u .BI "void glBindTextures(GLuint\ " "first" ", GLsizei\ " "count" ", const\ GLuint\ *" "textures" ");" .SH "PARAMETERS" .PP \fIfirst\fR .RS 4 Specifies the first texture unit to which a texture is to be bound\&. .RE .PP \fIcount\fR .RS 4 Specifies the number of textures to bind\&. .RE .PP \fItextures\fR .RS 4 Specifies the address of an array of names of existing texture objects\&. .RE .SH "DESCRIPTION" .PP \fBglBindTextures\fR binds an array of existing texture objects to a specified number of consecutive texture units\&. \fIcount\fR specifies the number of texture objects whose names are stored in the array \fItextures\fR\&. That number of texture names are read from the array and bound to the \fIcount\fR consecutive texture units starting from \fIfirst\fR\&. The target, or type of texture is deduced from the texture object and each texture is bound to the corresponding target of the texture unit\&. If the name zero appears in the \fItextures\fR array, any existing binding to any target of the texture unit is reset and the default texture for that target is bound in its place\&. Any non\-zero entry in \fItextures\fR must be the name of an existing texture object\&. If \fItextures\fR is \fBNULL\fR then it is as if an appropriately sized array containing only zeros had been specified\&. .PP With the exception that the active texture selector maintains its current value, \fBglBindTextures\fR is equivalent to the following pseudo code: .sp .if n \{\ .RS 4 .\} .nf for (i = 0; i < count; i++) { GLuint texture; if (textures == NULL) { texture = 0; } else { texture = textures[i]; } glActiveTexture(GL_TEXTURE0 + first + i); if (texture != 0) { GLenum target = /* target of textures[i] */; glBindTexture(target, textures[i]); } else { for (target in all supported targets) { glBindTexture(target, 0); } } } .fi .if n \{\ .RE .\} .PP Each entry in \fItextures\fR will be checked individually and if found to be invalid, the state for that texture unit will not be changed and an error will be generated\&. However, the state for other texture units referenced by the command will still be updated\&. .SH "NOTES" .PP \fBglBindTextures\fR is available only if the GL version is 4\&.4 or higher\&. .PP Note that because \fBglBindTextures\fR cannot create new textures (even if a name passed has been previously generated by call to \fBglGenTextures\fR()), names pased to \fBglBindTextures\fR must have been bound at least once previously via a call to \fBglBindTexture\fR()\&. .SH "ERRORS" .PP \fBGL_INVALID_OPERATION\fR is generated if \fIfirst\fR + \fIcount\fR is greater than the number of texture image units supported by the implementation\&. .PP \fBGL_INVALID_OPERATION\fR is generated if any value in textures is not zero or the name of an existing texture object\&. .SH "ASSOCIATED GETS" .PP \fBglGet\fR() with argument \fBGL_TEXTURE_BINDING_1D\fR, \fBGL_TEXTURE_BINDING_2D\fR, \fBGL_TEXTURE_BINDING_3D\fR, \fBGL_TEXTURE_BINDING_1D_ARRAY\fR, \fBGL_TEXTURE_BINDING_2D_ARRAY\fR, \fBGL_TEXTURE_BINDING_RECTANGLE\fR, \fBGL_TEXTURE_BINDING_BUFFER\fR, \fBGL_TEXTURE_BINDING_CUBE_MAP\fR, \fBGL_TEXTURE_BINDING_CUBE_MAP\fR, \fBGL_TEXTURE_BINDING_CUBE_MAP_ARRAY\fR, \fBGL_TEXTURE_BINDING_2D_MULTISAMPLE\fR, or \fBGL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY\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. T{ \fBglBindTextures\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 .SH "SEE ALSO" .PP \fBglBindTexture\fR(), \fBglDeleteTextures\fR(), \fBglGenTextures\fR(), \fBglGet\fR(), \fBglGetTexParameter\fR(), \fBglIsTexture\fR(), \fBglTexImage1D\fR(), \fBglTexImage2D\fR(), \fBglTexImage2DMultisample\fR(), \fBglTexImage3D\fR(), \fBglTexImage3DMultisample\fR(), \fBglTexBuffer\fR(), \fBglTexParameter\fR() .SH "COPYRIGHT" .PP Copyright \(co 2013\-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 2013-2014 Khronos Group .br