'\" t .\" Title: glBindTexture .\" 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 "GLBINDTEXTURE" "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" glBindTexture \- bind a named texture to a texturing target .SH "C SPECIFICATION" .HP \w'void\ glBindTexture('u .BI "void glBindTexture(GLenum\ " "target" ", GLuint\ " "texture" ");" .SH "PARAMETERS" .PP \fItarget\fR .RS 4 Specifies the target to which the texture is bound\&. Must be one of \fBGL_TEXTURE_1D\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_3D\fR, \fBGL_TEXTURE_1D_ARRAY\fR, \fBGL_TEXTURE_2D_ARRAY\fR, \fBGL_TEXTURE_RECTANGLE\fR, \fBGL_TEXTURE_CUBE_MAP\fR, \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR, \fBGL_TEXTURE_BUFFER\fR, \fBGL_TEXTURE_2D_MULTISAMPLE\fR or \fBGL_TEXTURE_2D_MULTISAMPLE_ARRAY\fR\&. .RE .PP \fItexture\fR .RS 4 Specifies the name of a texture\&. .RE .SH "DESCRIPTION" .PP \fBglBindTexture\fR lets you create or use a named texture\&. Calling \fBglBindTexture\fR with \fItarget\fR set to \fBGL_TEXTURE_1D\fR, \fBGL_TEXTURE_2D\fR, \fBGL_TEXTURE_3D\fR, \fBGL_TEXTURE_1D_ARRAY\fR, \fBGL_TEXTURE_2D_ARRAY\fR, \fBGL_TEXTURE_RECTANGLE\fR, \fBGL_TEXTURE_CUBE_MAP\fR, \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR, \fBGL_TEXTURE_BUFFER\fR, \fBGL_TEXTURE_2D_MULTISAMPLE\fR or \fBGL_TEXTURE_2D_MULTISAMPLE_ARRAY\fR and \fItexture\fR set to the name of the new texture binds the texture name to the target\&. When a texture is bound to a target, the previous binding for that target is automatically broken\&. .PP Texture names are unsigned integers\&. The value zero is reserved to represent the default texture for each texture target\&. Texture names and the corresponding texture contents are local to the shared object space of the current GL rendering context; two rendering contexts share texture names only if they explicitly enable sharing between contexts through the appropriate GL windows interfaces functions\&. .PP You must use \fBglGenTextures\fR() to generate a set of new texture names\&. .PP When a texture is first bound, it assumes the specified target: A texture first bound to \fBGL_TEXTURE_1D\fR becomes one\-dimensional texture, a texture first bound to \fBGL_TEXTURE_2D\fR becomes two\-dimensional texture, a texture first bound to \fBGL_TEXTURE_3D\fR becomes three\-dimensional texture, a texture first bound to \fBGL_TEXTURE_1D_ARRAY\fR becomes one\-dimensional array texture, a texture first bound to \fBGL_TEXTURE_2D_ARRAY\fR becomes two\-dimensional array texture, a texture first bound to \fBGL_TEXTURE_RECTANGLE\fR becomes rectangle texture, a texture first bound to \fBGL_TEXTURE_CUBE_MAP\fR becomes a cube\-mapped texture, a texture first bound to \fBGL_TEXTURE_CUBE_MAP_ARRAY\fR becomes a cube\-mapped array texture, a texture first bound to \fBGL_TEXTURE_BUFFER\fR becomes a buffer texture, a texture first bound to \fBGL_TEXTURE_2D_MULTISAMPLE\fR becomes a two\-dimensional multisampled texture, and a texture first bound to \fBGL_TEXTURE_2D_MULTISAMPLE_ARRAY\fR becomes a two\-dimensional multisampled array texture\&. The state of a one\-dimensional texture immediately after it is first bound is equivalent to the state of the default \fBGL_TEXTURE_1D\fR at GL initialization, and similarly for the other texture types\&. .PP While a texture is bound, GL operations on the target to which it is bound affect the bound texture, and queries of the target to which it is bound return state from the bound texture\&. In effect, the texture targets become aliases for the textures currently bound to them, and the texture name zero refers to the default textures that were bound to them at initialization\&. .PP A texture binding created with \fBglBindTexture\fR remains active until a different texture is bound to the same target, or until the bound texture is deleted with \fBglDeleteTextures\fR()\&. .PP Once created, a named texture may be re\-bound to its same original target as often as needed\&. It is usually much faster to use \fBglBindTexture\fR to bind an existing named texture to one of the texture targets than it is to reload the texture image using \fBglTexImage1D\fR(), \fBglTexImage2D\fR(), \fBglTexImage3D\fR() or another similar function\&. .SH "NOTES" .PP The \fBGL_TEXTURE_2D_MULTISAMPLE\fR and \fBGL_TEXTURE_2D_MULTISAMPLE_ARRAY\fR targets are available only if the GL version is 3\&.2 or higher\&. .SH "ERRORS" .PP \fBGL_INVALID_ENUM\fR is generated if \fItarget\fR is not one of the allowable values\&. .PP \fBGL_INVALID_VALUE\fR is generated if \fItarget\fR is not a name returned from a previous call to \fBglGenTextures\fR()\&. .PP \fBGL_INVALID_OPERATION\fR is generated if \fItexture\fR was previously created with a target that doesn\*(Aqt match that of \fItarget\fR\&. .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{ \fBglBindTexture\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 \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 1991\-2006 Silicon Graphics, Inc\&. Copyright \(co 2010\-2014 Khronos Group\&. This document is licensed under the SGI Free Software B License\&. For details, see \m[blue]\fBhttp://oss\&.sgi\&.com/projects/FreeB/\fR\m[]\&. .SH "COPYRIGHT" .br Copyright \(co 1991-2006 Silicon Graphics, Inc. .br Copyright \(co 2010-2014 Khronos Group .br