gl.IndexPointer(indexArray)
gl.IndexPointer()
specifies an array of color indexes to use when rendering. indexArray
must be an array containing
a number of floating-point values describing color indexes.
If you pass Nil
in indexArray
, the color index array buffer will be freed but it won't be removed from
OpenGL. You need to do this manually, e.g. by disabling the color index array or defining a new one.
When a color index array is specified, it is saved as client-side state, in addition to the current vertex array buffer object binding.
To enable and disable the color index array, call gl.EnableClientState() and
gl.DisableClientState() with the argument #GL_INDEX_ARRAY
. If enabled, the color index
array is used when gl.DrawArrays(), gl.DrawElements(),
or gl.ArrayElement() is called.
Color indexes are not supported for interleaved vertex array formats (See gl.InterleavedArrays for details.).
The color index array is initially disabled and isn't accessed when gl.DrawArrays(), gl.DrawElements(), or gl.ArrayElement() is called.
Execution of gl.IndexPointer()
is not allowed between the execution of gl.Begin() and the corresponding execution
of gl.End(), but an error may or may not be generated. If no error is generated, the operation is undefined.
gl.IndexPointer()
is typically implemented on the client side.
Color index array parameters are client-side state and are therefore not saved or restored by gl.PushAttrib() and gl.PopAttrib(). Use gl.PushClientAttrib() and gl.PopClientAttrib() instead.
Please consult an OpenGL reference manual for more information.
Nil
(see above)#GL_INDEX_ARRAY
gl.Get() with argument #GL_INDEX_ARRAY_TYPE
gl.Get() with argument #GL_INDEX_ARRAY_STRIDE
gl.GetPointer() with argument #GL_INDEX_ARRAY_POINTER