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

NAME

6       glIndexPointer - define an array of color indexes
7
8

C SPECIFICATION

10       void glIndexPointer( GLenum type,
11                            GLsizei stride,
12                            const GLvoid *ptr )
13
14

PARAMETERS

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

DESCRIPTION

29       glIndexPointer  specifies  the  location and data  of an array of color
30       indexes to use when rendering.  type specifies the data  type  of  each
31       color  index  and  stride gives the byte stride from one color index to
32       the next allowing vertices and attributes to be packed  into  a  single
33       array  or stored in separate arrays.  (Single-array storage may be more
34       efficient on some implementations; see glInterleavedArrays.)
35
36       type, stride, and ptr are saved as client-side state.
37
38       The color index array is initially disabled. To enable and disable  the
39       array, call glEnableClientState and glDisableClientState with the argu‐
40       ment GL_INDEX_ARRAY. If enabled, the color index  array  is  used  when
41       glDrawArrays, glDrawElements or glArrayElement is called.
42
43       Use glDrawArrays to construct a sequence of primitives (all of the same
44       type) from  prespecified  vertex  and  vertex  attribute  arrays.   Use
45       glArrayElement  to  specify  primitives by indexing vertices and vertex
46       attributes and glDrawElements to construct a sequence of primitives  by
47       indexing vertices and vertex attributes.
48

NOTES

50       glIndexPointer is available only if the GL version is 1.1 or greater.
51
52       The color index array is initially disabled, and it isn't accessed when
53       glArrayElement, glDrawElements, or glDrawArrays is called.
54
55       Execution of glIndexPointer is not allowed between glBegin and the cor‐
56       responding glEnd, but an error may or may not be generated. If an error
57       is not generated, the operation is undefined.
58
59       glIndexPointer is typically implemented on the client side.
60
61       Since the color index array parameters are client-side state, they  are
62       not   saved   or   restored   by  glPushAttrib  and  glPopAttrib.   Use
63       glPushClientAttrib and glPopClientAttrib instead.
64

ERRORS

66       GL_INVALID_ENUM is generated if type is not an accepted value.
67
68       GL_INVALID_VALUE is generated if stride is negative.
69

ASSOCIATED GETS

71       glIsEnabled with argument GL_INDEX_ARRAY
72       glGet with argument GL_INDEX_ARRAY_TYPE
73       glGet with argument GL_INDEX_ARRAY_STRIDE
74       glGetPointerv with argument GL_INDEX_ARRAY_POINTER
75

SEE ALSO

77       glArrayElement(3G),        glColorPointer(3G),        glDrawArrays(3G),
78       glDrawElements(3G),         glEdgeFlagPointer(3G),        glEnable(3G),
79       glGetPointerv(3G),    glInterleavedArrays(3G),     glNormalPointer(3G),
80       glPopClientAttrib(3G),  glPushClientAttrib(3G),  glTexCoordPointer(3G),
81       glVertexPointer(3G)
82
83
84
85                                                            GLINDEXPOINTER(3G)
Impressum