1GLINDEXPOINTER(3G)               OpenGL Manual              GLINDEXPOINTER(3G)
2
3
4

NAME

6       glIndexPointer - define an array of color indexes
7

C SPECIFICATION

9       void glIndexPointer(GLenum type, GLsizei stride,
10                           const GLvoid * pointer);
11

PARAMETERS

13       type
14           Specifies the data type of each color index in the array. Symbolic
15           constants GL_UNSIGNED_BYTE, GL_SHORT, GL_INT, GL_FLOAT, and
16           GL_DOUBLE are accepted. The initial value is GL_FLOAT.
17
18       stride
19           Specifies the byte offset between consecutive color indexes. If
20           stride is 0, the color indexes are understood to be tightly packed
21           in the array. The initial value is 0.
22
23       pointer
24           Specifies a pointer to the first index in the array. The initial
25           value is 0.
26

DESCRIPTION

28       glIndexPointer specifies the location and data format of an array of
29       color indexes to use when rendering.  type specifies the data type of
30       each color index and stride specifies the byte stride from one color
31       index to the next, allowing vertices and attributes to be packed into a
32       single array or stored in separate arrays.
33
34       If a non-zero named buffer object is bound to the GL_ARRAY_BUFFER
35       target (see glBindBuffer()) while a color index array is specified,
36       pointer is treated as a byte offset into the buffer object's data
37       store. Also, the buffer object binding (GL_ARRAY_BUFFER_BINDING) is
38       saved as color index vertex array client-side state
39       (GL_INDEX_ARRAY_BUFFER_BINDING).
40
41       When a color index array is specified, type, stride, and pointer are
42       saved as client-side state, in addition to the current vertex array
43       buffer object binding.
44
45       To enable and disable the color index array, call glEnableClientState()
46       and glDisableClientState() with the argument GL_INDEX_ARRAY. If
47       enabled, the color index array is used when glDrawArrays(),
48       glMultiDrawArrays(), glDrawElements(), glMultiDrawElements(),
49       glDrawRangeElements(), or glArrayElement() is called.
50

NOTES

52       glIndexPointer is available only if the GL version is 1.1 or greater.
53
54       Color indexes are not supported for interleaved vertex array formats
55       (see glInterleavedArrays()).
56
57       The color index array is initially disabled and isn't accessed when
58       glArrayElement(), glDrawElements(), glDrawRangeElements(),
59       glDrawArrays(), glMultiDrawArrays(), or glMultiDrawElements() is
60       called.
61
62       Execution of glIndexPointer is not allowed between glBegin() and the
63       corresponding glEnd(), but an error may or may not be generated. If an
64       error is not generated, the operation is undefined.
65
66       glIndexPointer is typically implemented on the client side.
67
68       Color index array parameters are client-side state and are therefore
69       not saved or restored by glPushAttrib() and glPopAttrib(). Use
70       glPushClientAttrib() and glPopClientAttrib() instead.
71

ERRORS

73       GL_INVALID_ENUM is generated if type is not an accepted value.
74
75       GL_INVALID_VALUE is generated if stride is negative.
76

ASSOCIATED GETS

78       glIsEnabled() with argument GL_INDEX_ARRAY
79
80       glGet() with argument GL_INDEX_ARRAY_TYPE
81
82       glGet() with argument GL_INDEX_ARRAY_STRIDE
83
84       glGet() with argument GL_INDEX_ARRAY_BUFFER_BINDING
85
86       glGet() with argument GL_ARRAY_BUFFER_BINDING
87
88       glGetPointerv() with argument GL_INDEX_ARRAY_POINTER
89

SEE ALSO

91       glArrayElement(), glBindBuffer(), glColorPointer(),
92       glDisableClientState(), glDrawArrays(), glDrawElements(),
93       glDrawRangeElements(), glEdgeFlagPointer(), glEnableClientState(),
94       glFogCoordPointer(), glIndex(), glInterleavedArrays(),
95       glMultiDrawArrays(), glMultiDrawElements(), glNormalPointer(),
96       glPopClientAttrib(), glPushClientAttrib(), glSecondaryColorPointer(),
97       glTexCoordPointer(), glVertexAttribPointer(), glVertexPointer()
98
100       Copyright © 1991-2006 Silicon Graphics, Inc. This document is licensed
101       under the SGI Free Software B License. For details, see
102       http://oss.sgi.com/projects/FreeB/.
103

AUTHORS

105       opengl.org
106
107
108
109opengl.org                        06/10/2014                GLINDEXPOINTER(3G)
Impressum