1GLTEXCOORDPOINTER(3G) OpenGL Manual GLTEXCOORDPOINTER(3G)
2
3
4
6 glTexCoordPointer - define an array of texture coordinates
7
9 void glTexCoordPointer(GLint size, GLenum type, GLsizei stride,
10 const GLvoid * pointer);
11
13 size
14 Specifies the number of coordinates per array element. Must be 1,
15 2, 3, or 4. The initial value is 4.
16
17 type
18 Specifies the data type of each texture coordinate. Symbolic
19 constants GL_SHORT, GL_INT, GL_FLOAT, or GL_DOUBLE are accepted.
20 The initial value is GL_FLOAT.
21
22 stride
23 Specifies the byte offset between consecutive texture coordinate
24 sets. If stride is 0, the array elements are understood to be
25 tightly packed. The initial value is 0.
26
27 pointer
28 Specifies a pointer to the first coordinate of the first texture
29 coordinate set in the array. The initial value is 0.
30
32 glTexCoordPointer specifies the location and data format of an array of
33 texture coordinates to use when rendering. size specifies the number
34 of coordinates per texture coordinate set, and must be 1, 2, 3, or 4.
35 type specifies the data type of each texture coordinate, and stride
36 specifies the byte stride from one texture coordinate set to the next,
37 allowing vertices and attributes to be packed into a single array or
38 stored in separate arrays. (Single-array storage may be more efficient
39 on some implementations; see glInterleavedArrays().)
40
41 If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
42 target (see glBindBuffer()) while a texture coordinate array is
43 specified, pointer is treated as a byte offset into the buffer object's
44 data store. Also, the buffer object binding (GL_ARRAY_BUFFER_BINDING)
45 is saved as texture coordinate vertex array client-side state
46 (GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING).
47
48 When a texture coordinate array is specified, size, type, stride, and
49 pointer are saved as client-side state, in addition to the current
50 vertex array buffer object binding.
51
52 To enable and disable a texture coordinate array, call
53 glEnableClientState() and glDisableClientState() with the argument
54 GL_TEXTURE_COORD_ARRAY. If enabled, the texture coordinate array is
55 used when glArrayElement(), glDrawArrays(), glMultiDrawArrays(),
56 glDrawElements(), glMultiDrawElements(), or glDrawRangeElements() is
57 called.
58
60 glTexCoordPointer is available only if the GL version is 1.1 or
61 greater.
62
63 For OpenGL versions 1.3 and greater, or when the ARB_multitexture
64 extension is supported, glTexCoordPointer updates the texture
65 coordinate array state of the active client texture unit, specified
66 with glClientActiveTexture().
67
68 Each texture coordinate array is initially disabled and isn't accessed
69 when glArrayElement(), glDrawElements(), glDrawRangeElements(),
70 glDrawArrays(), glMultiDrawArrays(), or glMultiDrawElements() is
71 called.
72
73 Execution of glTexCoordPointer is not allowed between the execution of
74 glBegin() and the corresponding execution of glEnd(), but an error may
75 or may not be generated. If no error is generated, the operation is
76 undefined.
77
78 glTexCoordPointer is typically implemented on the client side.
79
80 Texture coordinate array parameters are client-side state and are
81 therefore not saved or restored by glPushAttrib() and glPopAttrib().
82 Use glPushClientAttrib() and glPopClientAttrib() instead.
83
85 GL_INVALID_VALUE is generated if size is not 1, 2, 3, or 4.
86
87 GL_INVALID_ENUM is generated if type is not an accepted value.
88
89 GL_INVALID_VALUE is generated if stride is negative.
90
92 glIsEnabled() with argument GL_TEXTURE_COORD_ARRAY
93
94 glGet() with argument GL_TEXTURE_COORD_ARRAY_SIZE
95
96 glGet() with argument GL_TEXTURE_COORD_ARRAY_TYPE
97
98 glGet() with argument GL_TEXTURE_COORD_ARRAY_STRIDE
99
100 glGet() with argument GL_TEXTURE_COORD_ARRAY_BUFFER_BINDING
101
102 glGet() with argument GL_ARRAY_BUFFER_BINDING
103
104 glGetPointerv() with argument GL_TEXTURE_COORD_ARRAY_POINTER
105
107 glArrayElement(), glBindBuffer(), glClientActiveTexture(),
108 glColorPointer(), glDisableClientState(), glDrawArrays(),
109 glDrawElements(), glDrawRangeElements(), glEdgeFlagPointer(),
110 glEnableClientState(), glFogCoordPointer(), glIndexPointer(),
111 glInterleavedArrays(), glMultiDrawArrays(), glMultiDrawElements(),
112 glMultiTexCoord(), glNormalPointer(), glPopClientAttrib(),
113 glPushClientAttrib(), glSecondaryColorPointer(), glTexCoord(),
114 glVertexAttribPointer(), glVertexPointer()
115
117 Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
118 under the SGI Free Software B License. For details, see
119 http://oss.sgi.com/projects/FreeB/.
120
122 opengl.org
123
124
125
126opengl.org 06/10/2014 GLTEXCOORDPOINTER(3G)