1GLDRAWRANGEELEMENTS(3G) GLDRAWRANGEELEMENTS(3G)
2
3
4
6 glDrawRangeElements - render primitives from array data
7
8
10 void glDrawRangeElements( GLenum mode,
11 GLuint start,
12 GLuint end,
13 GLsizei count,
14 GLenum type,
15 const GLvoid *indices )
16
17
19 mode Specifies what kind of primitives to render. Symbolic con‐
20 stants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
21 GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES,
22 GL_QUAD_STRIP, GL_QUADS, and GL_POLYGON are accepted.
23
24 start Specifies the minimum array index contained in indices.
25
26 end Specifies the maximum array index contained in indices.
27
28 count Specifies the number of elements to be rendered.
29
30 type Specifies the type of the values in count. Must be one of
31 GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
32
33 indices Specifies a pointer to the location where the indices are
34 stored.
35
37 glDrawRangeElements is a restricted form of glDrawElements. mode,
38 start, end, and count match the corresponding arguments to
39 glDrawElements, with the additional constraint that all values in the
40 arrays count must lie between start and end, inclusive.
41
42 Implementations denote recommended maximum amounts of vertex and
43 index data, which may be queried by calling glGet with argument
44 GL_MAX_ELEMENTS_VERTICES and GL_MAX_ELEMENTS_INDICES. If end−start+1
45 is greater than the value of GL_MAX_ELEMENTS_VERTICES, or if count is
46 greater than the value of GL_MAX_ELEMENTS_INDICES, then the call may
47 operate at reduced performance. There is no requirement that all ver‐
48 tices in the range [start, end] be referenced. However, the implemen‐
49 tation may partially process unused vertices, reducing performance from
50 what could be achieved with an optimal index set.
51
52 When glDrawRangeElements is called, it uses start sequential elements
53 from an enabled array, starting at count to construct a sequence of
54 geometric primitives. mode specifies what kind of primitives are con‐
55 structed, and how the array elements construct these primitives. If
56 more than one array is enabled, each is used. If GL_VERTEX_ARRAY is not
57 enabled, no geometric primitives are constructed.
58
59 Vertex attributes that are modified by glDrawRangeElements have an
60 unspecified value after glDrawRangeElements returns. For example, if
61 GL_COLOR_ARRAY is enabled, the value of the current color is undefined
62 after glDrawRangeElements executes. Attributes that aren't modified
63 maintain their previous values.
64
66 glDrawRangeElements is available only if the GL version is 1.2 or
67 greater.
68
69 glDrawRangeElements is included in display lists. If
70 glDrawRangeElements is entered into a display list, the necessary array
71 data (determined by the array pointers and enables) is also entered
72 into the display list. Because the array pointers and enables are
73 client-side state, their values affect display lists when the lists are
74 created, not when the lists are executed.
75
77 It is an error for indices to lie outside the range [start, end], but
78 implementations may not check for this situation. Such indices cause
79 implementation-dependent behavior.
80
81 GL_INVALID_ENUM is generated if mode is not an accepted value.
82
83 GL_INVALID_VALUE is generated if count is negative.
84
85 GL_INVALID_VALUE is generated if end < start.
86
87 GL_INVALID_OPERATION is generated if glDrawRangeElements is executed
88 between the execution of glBegin and the corresponding glEnd.
89
91 glGet with argument GL_MAX_ELEMENTS_VERTICES
92
93 glGet with argument GL_MAX_ELEMENTS_INDICES
94
96 glArrayElement(3G), glColorPointer(3G), glDrawArrays(3G),
97 glDrawElements(3G), glEdgeFlagPointer(3G), glGetPointerv(3G),
98 glIndexPointer(3G), glInterleavedArrays(3G), glNormalPointer(3G),
99 glTexCoordPointer(3G), glVertexPointer(3G)
100
101
102
103 GLDRAWRANGEELEMENTS(3G)