5
.ds Dt 24 September 1999
9
.ds Xs 22158 7 drawrangeelements.gl
10
.TH GLDRAWRANGEELEMENTS 3G
12
.B "glDrawRangeElements
13
\- render primitives from array data
16
void \f3glDrawRangeElements\fP(
19
.ta \w'\f3void \fPglDrawRangeElements( 'u
24
const GLvoid \fI*indices\fP )
31
.TP \w'\fIindices\fP\ \ 'u
33
Specifies what kind of primitives to render.
36
\%\f3GL_LINE_STRIP\fP,
39
\%\f3GL_TRIANGLE_STRIP\fP,
40
\%\f3GL_TRIANGLE_FAN\fP,
42
\%\f3GL_QUAD_STRIP\fP,
44
and \%\f3GL_POLYGON\fP are accepted.
47
Specifies the minimum array index contained in \f2indices\fP.
50
Specifies the maximum array index contained in \f2indices\fP.
53
Specifies the number of elements to be rendered.
56
Specifies the type of the values in \f2count\fP. Must be one of
57
\%\f3GL_UNSIGNED_BYTE\fP, \%\f3GL_UNSIGNED_SHORT\fP, or
58
\%\f3GL_UNSIGNED_INT\fP.
61
Specifies a pointer to the location where the indices are stored.
63
\%\f3glDrawRangeElements\fP is a restricted form of \%\f3glDrawElements\fP. \f2mode\fP, \f2start\fP, \f2end\fP,
64
and \f2count\fP match the corresponding arguments to \%\f3glDrawElements\fP, with
65
the additional constraint that all values in the arrays \f2count\fP must lie
66
between \f2start\fP and \f2end\fP, inclusive.
68
Implementations denote recommended maximum amounts of vertex and
71
which may be queried by calling \%\f3glGet\fP with argument
72
\%\f3GL_MAX_ELEMENTS_VERTICES\fP and \%\f3GL_MAX_ELEMENTS_INDICES\fP.
73
If $"end" ~-~ "start" ~+~ 1$ is greater than the value of
74
\%\f3GL_MAX_ELEMENTS_VERTICES\fP, or if \f2count\fP is greater than the value of
75
\%\f3GL_MAX_ELEMENTS_INDICES\fP, then the call may operate at reduced
76
performance. There is no requirement that all vertices in the range
77
[\f2start\fP,\ \f2end\fP] be referenced. However, the implementation may
78
partially process unused vertices, reducing performance from what could
79
be achieved with an optimal index set.
81
When \%\f3glDrawRangeElements\fP is called, it uses \f2start\fP sequential elements from an
82
enabled array, starting at \f2count\fP to construct a sequence of
83
geometric primitives. \f2mode\fP specifies what kind of primitives are
84
constructed, and how the array elements construct these primitives. If
85
more than one array is enabled, each is used. If
86
\%\f3GL_VERTEX_ARRAY\fP is not enabled, no geometric primitives are
89
Vertex attributes that are modified by \%\f3glDrawRangeElements\fP have an
90
unspecified value after \%\f3glDrawRangeElements\fP returns. For example, if
91
\%\f3GL_COLOR_ARRAY\fP is enabled, the value of the current color is
92
undefined after \%\f3glDrawRangeElements\fP executes. Attributes that aren't
93
modified maintain their previous values.
95
\%\f3glDrawRangeElements\fP is available only if the GL version is 1.2 or greater.
97
\%\f3glDrawRangeElements\fP is included in display lists. If \%\f3glDrawRangeElements\fP is entered into a
99
the necessary array data (determined by the array pointers and
101
entered into the display list. Because the array pointers and
102
enables are client-side state, their values affect display lists
103
when the lists are created, not when the lists are executed.
105
It is an error for indices to lie outside the range [\f2start\fP,\ \f2end\fP],
106
but implementations may not check for this situation. Such indices
107
cause implementation-dependent behavior.
109
\%\f3GL_INVALID_ENUM\fP is generated if \f2mode\fP is not an accepted value.
111
\%\f3GL_INVALID_VALUE\fP is generated if \f2count\fP is negative.
113
\%\f3GL_INVALID_VALUE\fP is generated if \f2end\fP $<$ \f2start\fP.
115
\%\f3GL_INVALID_OPERATION\fP is generated if \%\f3glDrawRangeElements\fP is executed between
116
the execution of \%\f3glBegin\fP and the corresponding \%\f3glEnd\fP.
118
\%\f3glGet\fP with argument \%\f3GL_MAX_ELEMENTS_VERTICES\fP
120
\%\f3glGet\fP with argument \%\f3GL_MAX_ELEMENTS_INDICES\fP
122
\%\f3glArrayElement(3G)\fP,
123
\%\f3glColorPointer(3G)\fP,
124
\%\f3glDrawArrays(3G)\fP,
125
\%\f3glDrawElements(3G)\fP,
126
\%\f3glEdgeFlagPointer(3G)\fP,
127
\%\f3glGetPointerv(3G)\fP,
128
\%\f3glIndexPointer(3G)\fP,
129
\%\f3glInterleavedArrays(3G)\fP,
130
\%\f3glNormalPointer(3G)\fP,
131
\%\f3glTexCoordPointer(3G)\fP,
132
\%\f3glVertexPointer(3G)\fP