NAME
glDrawArrays
- render primitives from array data
C SPECIFICATION
void ggllDDrraawwAArrrraayyss(
GLenum _m_o_d_e,
GLint _f_i_r_s_t,
GLsizei _c_o_u_n_t )
delim $$
PARAMETERS
-
_m_o_d_e
-
Specifies what kind of primitives to render.
Symbolic constants
GGLL__PPOOIINNTTSS,
GGLL__LLIINNEE__SSTTRRIIPP,
GGLL__LLIINNEE__LLOOOOPP,
GGLL__LLIINNEESS,
GGLL__TTRRIIAANNGGLLEE__SSTTRRIIPP,
GGLL__TTRRIIAANNGGLLEE__FFAANN,
GGLL__TTRRIIAANNGGLLEESS,
GGLL__QQUUAADD__SSTTRRIIPP,
GGLL__QQUUAADDSS,
and GGLL__PPOOLLYYGGOONN are accepted.
-
_f_i_r_s_t
-
Specifies the starting index in the enabled arrays.
-
_c_o_u_n_t
-
Specifies the number of indices to be rendered.
DESCRIPTION
ggllDDrraawwAArrrraayyss specifies multiple geometric primitives
with very few subroutine calls. Instead of calling a GL procedure
to pass each individual vertex, normal, texture coordinate, edge
flag, or color, you can prespecify
separate arrays of vertices, normals, and colors and use them to
construct a sequence of primitives with a single
call to ggllDDrraawwAArrrraayyss.
When ggllDDrraawwAArrrraayyss is called, it uses _c_o_u_n_t sequential elements from each
enabled array to construct a sequence of geometric primitives,
beginning with element _f_i_r_s_t. _m_o_d_e specifies what kind of
primitives are constructed, and how the array elements
construct those primitives. If GGLL__VVEERRTTEEXX__AARRRRAAYY is not enabled, no
geometric primitives are generated.
Vertex attributes that are modified by ggllDDrraawwAArrrraayyss have an
unspecified value after ggllDDrraawwAArrrraayyss returns. For example, if
GGLL__CCOOLLOORR__AARRRRAAYY is enabled, the value of the current color is
undefined after ggllDDrraawwAArrrraayyss executes. Attributes that aren't
modified remain well defined.
NOTES
ggllDDrraawwAArrrraayyss is available only if the GL version is 1.1 or greater.
ggllDDrraawwAArrrraayyss is included in display lists. If ggllDDrraawwAArrrraayyss 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.
ERRORS
GGLL__IINNVVAALLIIDD__EENNUUMM is generated if _m_o_d_e is not an accepted value.
GGLL__IINNVVAALLIIDD__VVAALLUUEE is generated if _c_o_u_n_t is negative.
GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllDDrraawwAArrrraayyss is executed between
the execution of ggllBBeeggiinn and the corresponding ggllEEnndd.
SEE ALSO
ggllAArrrraayyEElleemmeenntt((33GG)),
ggllCCoolloorrPPooiinntteerr((33GG)),
ggllDDrraawwEElleemmeennttss((33GG)),
ggllDDrraawwRRaannggeeEElleemmeennttss((33GG)),
ggllEEddggeeFFllaaggPPooiinntteerr((33GG)),
ggllGGeettPPooiinntteerrvv((33GG)),
ggllIInnddeexxPPooiinntteerr((33GG)),
ggllIInntteerrlleeaavveeddAArrrraayyss((33GG)),
ggllNNoorrmmaallPPooiinntteerr((33GG)),
ggllTTeexxCCoooorrddPPooiinntteerr((33GG)),
ggllVVeerrtteexxPPooiinntteerr((33GG))