Specifies the array elements used to render a vertex.
OpenGL C bindings library: libGL.a
void glArrayElementEXT(GLint i )
|Specifies an index in the enabled arrays.
The glArrayElementEXT commands are used within glBegin/glEnd pairs to specify vertex and attribute data for point, line and polygon primitives. When glArrayElementEXT is called, a single vertex is drawn, using vertex and attribute data taken from location i of the enabled arrays.
Use glArrayElementEXT 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 perprimitive attributes, such as a single normal per individual triangle.
The glArrayElementEXT subroutine may be included in display lists. If glArrayElementEXT is entered into a display list, the necessary array data (determined by the array pointers and enables) is also entered into the display list. Because the array pointers and enables are client side state, their values affect display lists when the lists are created, not when the lists are executed.
Static array data may be read and cached by the implementation at any time. If static array elements are modified and the arrays are not respecified, the results of any subsequent calls to glArrayElementEXT are undefined.
The glArrayElementEXT subroutine executes even if GL_VERTEX_ARRAY_EXT is not enabled. No drawing occurs in this case, but the attributes corresponding to enabled arrays are modified.
Although it is not an error to respecify an array between the execution of glBegin and the corresponding execution of glEnd, the result of such respecification is undefined.
The glArrayElementEXT subroutine is part of the _extname(EXT_vertex_array) extension, not part of the core GL command set. If _extstring(EXT_vertex_array) is included in the string returned by glGetString, when called with argument GL_EXTENSIONS, extension _extname(EXT_vertex_array) is supported.
|Contains extensions to C language constants, variable type definitions, and ANSI function prototypes for OpenGL.
The glColorPointerEXT subroutine, glDrawArraysEXT subroutine, glEdgeFlagPointerEXT subroutine, glGetPointervEXT subroutine, glIndexPointerEXT subroutine, glNormalPointerEXT subroutine, glTexCoordPointerEXT subroutine, glVertexPointerEXT subroutine.