1GLARRAYELEMENT(3G) GLARRAYELEMENT(3G)
2
3
4
6 glArrayElement - render a vertex using the specified vertex array ele‐
7 ment
8
9
11 void glArrayElement( GLint i )
12
13
15 i Specifies an index into the enabled vertex data arrays.
16
18 glArrayElement commands are used within glBegin/glEnd pairs to specify
19 vertex and attribute data for point, line, and polygon primitives. If
20 GL_VERTEX_ARRAY is enabled when glArrayElement is called, a single ver‐
21 tex is drawn, using vertex and attribute data taken from location i of
22 the enabled arrays. If GL_VERTEX_ARRAY is not enabled, no drawing
23 occurs but the attributes corresponding to the enabled arrays are modi‐
24 fied.
25
26 Use glArrayElement to construct primitives by indexing vertex data,
27 rather than by streaming through arrays of data in first-to-last order.
28 Because each call specifies only a single vertex, it is possible to
29 explicitly specify per-primitive attributes such as a single normal per
30 individual triangle.
31
32 Changes made to array data between the execution of glBegin and the
33 corresponding execution of glEnd may affect calls to glArrayElement
34 that are made within the same glBegin/glEnd period in non-sequential
35 ways. That is, a call to
36 glArrayElement that precedes a change to array data may access the
37 changed data, and a call that follows a change to array data may access
38 original data.
39
41 glArrayElement is available only if the GL version is 1.1 or greater.
42
43 glArrayElement is included in display lists. If glArrayElement is
44 entered into a display list, the necessary array data (determined by
45 the array pointers and enables) is also entered into the display list.
46 Because the array pointers and enables are client-side state, their
47 values affect display lists when the lists are created, not when the
48 lists are executed.
49
51 glClientActiveTextureARB(3G), glColorPointer(3G), glDrawArrays(3G),
52 glEdgeFlagPointer(3G), glGetPointerv(3G), glIndexPointer(3G),
53 glInterleavedArrays(3G), glNormalPointer(3G), glTexCoordPointer(3G),
54 glVertexPointer(3G)
55
56
57
58 GLARRAYELEMENT(3G)