NAME

glDrawRangeElements - render primitives from array data

C SPECIFICATION

void ggllDDrraawwRRaannggeeEElleemmeennttss( GLenum _m_o_d_e,
                          GLuint _s_t_a_r_t,
                          GLuint _e_n_d,
                          GLsizei _c_o_u_n_t,
                          GLenum _t_y_p_e,
                          const GLvoid _*_i_n_d_i_c_e_s )

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.
_s_t_a_r_t
Specifies the minimum array index contained in _i_n_d_i_c_e_s.
_e_n_d
Specifies the maximum array index contained in _i_n_d_i_c_e_s.
_c_o_u_n_t
Specifies the number of elements to be rendered.
_t_y_p_e
Specifies the type of the values in _c_o_u_n_t. Must be one of GGLL__UUNNSSIIGGNNEEDD__BBYYTTEE, GGLL__UUNNSSIIGGNNEEDD__SSHHOORRTT, or GGLL__UUNNSSIIGGNNEEDD__IINNTT.
_i_n_d_i_c_e_s
Specifies a pointer to the location where the indices are stored.

DESCRIPTION

ggllDDrraawwRRaannggeeEElleemmeennttss is a restricted form of ggllDDrraawwEElleemmeennttss. _m_o_d_e, _s_t_a_r_t, _e_n_d, and _c_o_u_n_t match the corresponding arguments to ggllDDrraawwEElleemmeennttss, with the additional constraint that all values in the arrays _c_o_u_n_t must lie between _s_t_a_r_t and _e_n_d, inclusive.

Implementations denote recommended maximum amounts of vertex and
index data, which may be queried by calling ggllGGeett with argument GGLL__MMAAXX__EELLEEMMEENNTTSS__VVEERRTTIICCEESS and GGLL__MMAAXX__EELLEEMMEENNTTSS__IINNDDIICCEESS. If $"end" ~-~ "start" ~+~ 1$ is greater than the value of GGLL__MMAAXX__EELLEEMMEENNTTSS__VVEERRTTIICCEESS, or if _c_o_u_n_t is greater than the value of GGLL__MMAAXX__EELLEEMMEENNTTSS__IINNDDIICCEESS, then the call may operate at reduced performance. There is no requirement that all vertices in the range [_s_t_a_r_t, _e_n_d] be referenced. However, the implementation may partially process unused vertices, reducing performance from what could be achieved with an optimal index set.

When ggllDDrraawwRRaannggeeEElleemmeennttss is called, it uses _s_t_a_r_t sequential elements from an enabled array, starting at _c_o_u_n_t to construct a sequence of geometric primitives. _m_o_d_e specifies what kind of primitives are constructed, and how the array elements construct these primitives. If more than one array is enabled, each is used. If GGLL__VVEERRTTEEXX__AARRRRAAYY is not enabled, no geometric primitives are constructed.

Vertex attributes that are modified by ggllDDrraawwRRaannggeeEElleemmeennttss have an unspecified value after ggllDDrraawwRRaannggeeEElleemmeennttss returns. For example, if GGLL__CCOOLLOORR__AARRRRAAYY is enabled, the value of the current color is undefined after ggllDDrraawwRRaannggeeEElleemmeennttss executes. Attributes that aren't modified maintain their previous values.

NOTES

ggllDDrraawwRRaannggeeEElleemmeennttss is available only if the GL version is 1.2 or greater.

ggllDDrraawwRRaannggeeEElleemmeennttss is included in display lists. If ggllDDrraawwRRaannggeeEElleemmeennttss 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

It is an error for indices to lie outside the range [_s_t_a_r_t, _e_n_d], but implementations may not check for this situation. Such indices cause implementation-dependent behavior.

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__VVAALLUUEE is generated if _e_n_d $<$ _s_t_a_r_t.

GGLL__IINNVVAALLIIDD__OOPPEERRAATTIIOONN is generated if ggllDDrraawwRRaannggeeEElleemmeennttss is executed between the execution of ggllBBeeggiinn and the corresponding ggllEEnndd.

ASSOCIATED GETS

ggllGGeett with argument GGLL__MMAAXX__EELLEEMMEENNTTSS__VVEERRTTIICCEESS

ggllGGeett with argument GGLL__MMAAXX__EELLEEMMEENNTTSS__IINNDDIICCEESS

SEE ALSO

ggllAArrrraayyEElleemmeenntt((33GG)), ggllCCoolloorrPPooiinntteerr((33GG)), ggllDDrraawwAArrrraayyss((33GG)), ggllDDrraawwEElleemmeennttss((33GG)), ggllEEddggeeFFllaaggPPooiinntteerr((33GG)), ggllGGeettPPooiinntteerrvv((33GG)), ggllIInnddeexxPPooiinntteerr((33GG)), ggllIInntteerrlleeaavveeddAArrrraayyss((33GG)), ggllNNoorrmmaallPPooiinntteerr((33GG)), ggllTTeexxCCoooorrddPPooiinntteerr((33GG)), ggllVVeerrtteexxPPooiinntteerr((33GG))