NAME
glIndexPointer
- define an array of color indexes
C SPECIFICATION
void ggllIInnddeexxPPooiinntteerr(
GLenum _t_y_p_e,
GLsizei _s_t_r_i_d_e,
const GLvoid _*_p_t_r )
delim $$
PARAMETERS
-
_t_y_p_e
-
Specifies the data type of each color index in the array.
Symbolic constants
GGLL__UUNNSSIIGGNNEEDD__BBYYTTEE,
GGLL__SSHHOORRTT,
GGLL__IINNTT,
GGLL__FFLLOOAATT,
and GGLL__DDOOUUBBLLEE
are accepted. The initial value is GGLL__FFLLOOAATT.
-
_s_t_r_i_d_e
-
Specifies the byte offset between consecutive color indexes.
If _s_t_r_i_d_e is 0 (the initial value), the color indexes are understood to
be tightly packed in the array.
The initial value is 0.
-
_p_t_r
-
Specifies a pointer to the first index in the array.
The initial value is 0.
DESCRIPTION
ggllIInnddeexxPPooiinntteerr specifies the location and data of an array of color indexes
to use when rendering.
_t_y_p_e specifies the data type of
each color index and _s_t_r_i_d_e 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.
(Single-array storage may be more efficient on some implementations;
see ggllIInntteerrlleeaavveeddAArrrraayyss.)
_t_y_p_e, _s_t_r_i_d_e, and _p_t_r are saved as client-side
state.
The color index array is initially disabled. To enable and disable
the array, call ggllEEnnaabblleeCClliieennttSSttaattee and
ggllDDiissaabblleeCClliieennttSSttaattee with the argument GGLL__IINNDDEEXX__AARRRRAAYY. If
enabled, the color index array is used when ggllDDrraawwAArrrraayyss,
ggllDDrraawwEElleemmeennttss or ggllAArrrraayyEElleemmeenntt is called.
Use ggllDDrraawwAArrrraayyss to construct a sequence of primitives (all of
the same type) from prespecified vertex and vertex attribute arrays.
Use ggllAArrrraayyEElleemmeenntt to specify primitives
by indexing vertices and vertex attributes and ggllDDrraawwEElleemmeennttss to
construct a sequence of primitives by indexing vertices and vertex attributes.
NOTES
ggllIInnddeexxPPooiinntteerr is available only if the GL version is 1.1 or greater.
The color index array is initially disabled, and it isn't accessed when
ggllAArrrraayyEElleemmeenntt, ggllDDrraawwEElleemmeennttss, or ggllDDrraawwAArrrraayyss is called.
Execution of ggllIInnddeexxPPooiinntteerr is not allowed between
ggllBBeeggiinn and the corresponding ggllEEnndd,
but an error may or may not be generated. If an error is not generated,
the operation is undefined.
ggllIInnddeexxPPooiinntteerr is typically implemented on the client side.
Since the color index array parameters are client-side state, they are
not saved or restored by ggllPPuusshhAAttttrriibb and ggllPPooppAAttttrriibb.
Use ggllPPuusshhCClliieennttAAttttrriibb and
ggllPPooppCClliieennttAAttttrriibb instead.
ERRORS
GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _t_y_p_e is not an accepted value.
GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _s_t_r_i_d_e is negative.
ASSOCIATED GETS
ggllIIssEEnnaabblleedd with argument GGLL__IINNDDEEXX__AARRRRAAYY
ggllGGeett with argument GGLL__IINNDDEEXX__AARRRRAAYY__TTYYPPEE
ggllGGeett with argument GGLL__IINNDDEEXX__AARRRRAAYY__SSTTRRIIDDEE
ggllGGeettPPooiinntteerrvv with argument GGLL__IINNDDEEXX__AARRRRAAYY__PPOOIINNTTEERR
SEE ALSO
ggllAArrrraayyEElleemmeenntt((33GG)),
ggllCCoolloorrPPooiinntteerr((33GG)),
ggllDDrraawwAArrrraayyss((33GG)),
ggllDDrraawwEElleemmeennttss((33GG)),
ggllEEddggeeFFllaaggPPooiinntteerr((33GG)),
ggllEEnnaabbllee((33GG)),
ggllGGeettPPooiinntteerrvv((33GG)),
ggllIInntteerrlleeaavveeddAArrrraayyss((33GG)),
ggllNNoorrmmaallPPooiinntteerr((33GG)),
ggllPPooppCClliieennttAAttttrriibb((33GG)),
ggllPPuusshhCClliieennttAAttttrriibb((33GG)),
ggllTTeexxCCoooorrddPPooiinntteerr((33GG)),
ggllVVeerrtteexxPPooiinntteerr((33GG))