GL.glArrayElement commands are used within GL.glBegin/GL.glEnd pairs to
specify vertex and attribute data for point, line, and polygon
primitives. If GL_VERTEX_ARRAY is enabled when GL.glArrayElement is called, a
single vertex is drawn, using
vertex and attribute data taken from location i of the enabled
arrays. If GL_VERTEX_ARRAY is not enabled, no drawing occurs but
the attributes corresponding to the enabled arrays are modified.
Use GL.glArrayElement to construct primitives by indexing vertex data, rather than
by streaming through arrays of data in first-to-last order. Because
each call specifies only a single vertex, it is possible to explicitly
specify per-primitive attributes such as a single normal per
individual triangle.
Changes made to array data between the execution of GL.glBegin and the
corresponding execution of GL.glEnd may affect calls to GL.glArrayElement that are made
within the same GL.glBegin/GL.glEnd period in non-sequential ways.
That is, a call to
GL.glArrayElement that precedes a change to array data may
access the changed data, and a call that follows a change to array data
may access original data.