The type parameter specifies the data type of each color index and stride gives the byte stride from one color index to the next allowing vertices and attributes to be packed into a single array or stored in separate arrays. The parameters type , stride , and pointer are saved as client-side state. The color index array is initially disabled. If enabled, the color index array is used when glDrawArrays , glDrawElements or glArrayElement is called. Use glArrayElement to specify primitives by indexing vertices and vertex attributes and glDrawElements to construct a sequence of primitives by indexing vertices and vertex attributes.
Parameters type Specifies the data type of each color index in the array.
The glIndexPointer subroutine is available only if the GL version is 1.1 or greater. The color index array is initially disabled, and it won't be accessed when glArrayElement , glDrawElements or glDrawArrays is called. Execution of glIndexPointer is not allowed between glBegin and the corresponding glEnd , but an error may or may not be generated. If an error is not generated, the operation is undefined. The glIndexPointer subroutine is typically implemented on the client side with no protocol.