glArrayElement
[New
- Windows 95, OEM Service Release 2]
The glArrayElement
function specifies the array elements used to render a vertex.
void glArrayElement(
GLint index |
|
); |
|
Parameters
index
An index in
the enabled arrays.
Remarks
Use the glArrayElement
function within glBegin
You can use glArrayElement
to construct primitives by indexing vertex data, rather than by streaming
through arrays of data in first-to-last order. Because glArrayElement
specifies a single vertex only, you can explicitly specify attributes for
individual primitives. For example, you can set a single normal for each
individual triangle.
When you
include calls to glArrayElement in display lists, the necessary array
data, determined by the array pointers and enable values, is entered in the
display list also. Array pointer and enable values are determined when display
lists are created, not when display lists are executed.
You can read
and cache static array data at any time with glArrayElement. When you
modify the elements of a static array without specifying the array again, the
results of any subsequent calls to glArrayElement are undefined.
When you call
glArrayElement without first calling glEnableClientState(GL_VERTEX_ARRAY),
no drawing occurs, but the attributes corresponding to enabled arrays are
modified. Although no error is generated when you specify an array within glBegin
and glEnd pairs, the results are undefined.
See Also