1GLBINDTEXTURE(3G)               [FIXME: manual]              GLBINDTEXTURE(3G)
2
3
4

NAME

6       glBindTexture - bind a named texture to a texturing target
7

C SPECIFICATION

9       void glBindTexture(GLenum target, GLuint texture);
10

PARAMETERS

12       target
13           Specifies the target to which the texture is bound. Must be one of
14           GL_TEXTURE_1D, GL_TEXTURE_2D, GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY,
15           GL_TEXTURE_2D_ARRAY, GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP,
16           GL_TEXTURE_CUBE_MAP_ARRAY, GL_TEXTURE_BUFFER,
17           GL_TEXTURE_2D_MULTISAMPLE or GL_TEXTURE_2D_MULTISAMPLE_ARRAY.
18
19       texture
20           Specifies the name of a texture.
21

DESCRIPTION

23       glBindTexture lets you create or use a named texture. Calling
24       glBindTexture with target set to GL_TEXTURE_1D, GL_TEXTURE_2D,
25       GL_TEXTURE_3D, GL_TEXTURE_1D_ARRAY, GL_TEXTURE_2D_ARRAY,
26       GL_TEXTURE_RECTANGLE, GL_TEXTURE_CUBE_MAP, GL_TEXTURE_CUBE_MAP_ARRAY,
27       GL_TEXTURE_BUFFER, GL_TEXTURE_2D_MULTISAMPLE or
28       GL_TEXTURE_2D_MULTISAMPLE_ARRAY and texture set to the name of the new
29       texture binds the texture name to the target. When a texture is bound
30       to a target, the previous binding for that target is automatically
31       broken.
32
33       Texture names are unsigned integers. The value zero is reserved to
34       represent the default texture for each texture target. Texture names
35       and the corresponding texture contents are local to the shared object
36       space of the current GL rendering context; two rendering contexts share
37       texture names only if they explicitly enable sharing between contexts
38       through the appropriate GL windows interfaces functions.
39
40       You must use glGenTextures() to generate a set of new texture names.
41
42       When a texture is first bound, it assumes the specified target: A
43       texture first bound to GL_TEXTURE_1D becomes one-dimensional texture, a
44       texture first bound to GL_TEXTURE_2D becomes two-dimensional texture, a
45       texture first bound to GL_TEXTURE_3D becomes three-dimensional texture,
46       a texture first bound to GL_TEXTURE_1D_ARRAY becomes one-dimensional
47       array texture, a texture first bound to GL_TEXTURE_2D_ARRAY becomes
48       two-dimensional array texture, a texture first bound to
49       GL_TEXTURE_RECTANGLE becomes rectangle texture, a texture first bound
50       to GL_TEXTURE_CUBE_MAP becomes a cube-mapped texture, a texture first
51       bound to GL_TEXTURE_CUBE_MAP_ARRAY becomes a cube-mapped array texture,
52       a texture first bound to GL_TEXTURE_BUFFER becomes a buffer texture, a
53       texture first bound to GL_TEXTURE_2D_MULTISAMPLE becomes a
54       two-dimensional multisampled texture, and a texture first bound to
55       GL_TEXTURE_2D_MULTISAMPLE_ARRAY becomes a two-dimensional multisampled
56       array texture. The state of a one-dimensional texture immediately after
57       it is first bound is equivalent to the state of the default
58       GL_TEXTURE_1D at GL initialization, and similarly for the other texture
59       types.
60
61       While a texture is bound, GL operations on the target to which it is
62       bound affect the bound texture, and queries of the target to which it
63       is bound return state from the bound texture. In effect, the texture
64       targets become aliases for the textures currently bound to them, and
65       the texture name zero refers to the default textures that were bound to
66       them at initialization.
67
68       A texture binding created with glBindTexture remains active until a
69       different texture is bound to the same target, or until the bound
70       texture is deleted with glDeleteTextures().
71
72       Once created, a named texture may be re-bound to its same original
73       target as often as needed. It is usually much faster to use
74       glBindTexture to bind an existing named texture to one of the texture
75       targets than it is to reload the texture image using glTexImage1D(),
76       glTexImage2D(), glTexImage3D() or another similar function.
77

NOTES

79       The GL_TEXTURE_2D_MULTISAMPLE and GL_TEXTURE_2D_MULTISAMPLE_ARRAY
80       targets are available only if the GL version is 3.2 or higher.
81

ERRORS

83       GL_INVALID_ENUM is generated if target is not one of the allowable
84       values.
85
86       GL_INVALID_VALUE is generated if target is not a name returned from a
87       previous call to glGenTextures().
88
89       GL_INVALID_OPERATION is generated if texture was previously created
90       with a target that doesn't match that of target.
91

ASSOCIATED GETS

93       glGet() with argument GL_TEXTURE_BINDING_1D, GL_TEXTURE_BINDING_2D,
94       GL_TEXTURE_BINDING_3D, GL_TEXTURE_BINDING_1D_ARRAY,
95       GL_TEXTURE_BINDING_2D_ARRAY, GL_TEXTURE_BINDING_RECTANGLE,
96       GL_TEXTURE_BINDING_BUFFER, GL_TEXTURE_BINDING_CUBE_MAP,
97       GL_TEXTURE_BINDING_CUBE_MAP, GL_TEXTURE_BINDING_CUBE_MAP_ARRAY,
98       GL_TEXTURE_BINDING_2D_MULTISAMPLE, or
99       GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY.
100

VERSION SUPPORT

102       ┌──────────────┬───────────────────────────────────────────────────────────────────────┐
103       │              │                OpenGL Version                                         
104       ├──────────────┼─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┤
105Function      2.0 2.1 3.0 3.1 3.2 3.3 4.0 4.1 4.2 4.3 4.4 4.5 
106/             │     │     │     │     │     │     │     │     │     │     │     │     │
107Feature       │     │     │     │     │     │     │     │     │     │     │     │     │
108Name          │     │     │     │     │     │     │     │     │     │     │     │     │
109       ├──────────────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤
110glBindTexture │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │  ✔  │
111       └──────────────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘
112

SEE ALSO

114       glDeleteTextures(), glGenTextures(), glGet(), glGetTexParameter(),
115       glIsTexture(), glTexImage1D(), glTexImage2D(),
116       glTexImage2DMultisample(), glTexImage3D(), glTexImage3DMultisample(),
117       glTexBuffer(), glTexParameter()
118
120       Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014
121       Khronos Group. This document is licensed under the SGI Free Software B
122       License. For details, see http://oss.sgi.com/projects/FreeB/.
123
125       Copyright © 1991-2006 Silicon Graphics, Inc.
126       Copyright © 2010-2014 Khronos Group
127
128
129
130[FIXME: source]                   07/13/2018                 GLBINDTEXTURE(3G)
Impressum