D
glDrawArraysSethp
Chapter 4
115
glDrawArraysSethp
glDrawArraySethp: render multiple primitives from array data.
C Specification
void glDrawArraySethp(
GLenum mode,
const GLint* list,
GLsizei count)
Parameters
mode Specifies what kind of primitives to render. Symbolic constants
GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES,
GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES,
GL_QUAD_STRIP, GL_QUADS, and GL_POLYGON are accepted.
list Points to an array of starting indices in the enabled arrays.
count Specifies the number of groups of primitives to be rendered.
Description
glDrawArraySethp specifies multiple geometric primitives of the same type with a
single subroutine call. Instead of calling a GL procedure to pass each individual vertex,
normal, texture coordinate, edge flag, or color, you can use the vertex array calls to
pre-specify arrays of vertices, normals, and colors and use them to construct a sequence
of primitives with a single call to glDrawArraySethp.
When glDrawArraySethp is called, it iterates over count+1 array indices from the list.
For 0 ≥ i<count, glDrawArraySethp uses list[i+1] - list[i] sequential elements from each
enabled array to construct a sequence of geometric primitives, beginning with element
list[i]. mode specifies what kind of primitives are constructed, and how the array
elements construct those primitives. If GL_VERTEX_ARRAY is not enabled, no
geometric primitives are generated.
Vertex attributes that are modified by glDrawArraySethp have an unspecified value
after glDrawArraySethp returns. For example, if GL_C4UB_V3F is enabled, the value of
the current color is undefined after glDrawArraySethp executes. Attributes that aren’t
modified remain well defined.
glDrawArraySethp(mode, list, count) is functionally equivalent to:
for (i = 0; i < count; i++)
glDrawArrays(mode, list[i], list[i+1] - list[i]);
The behavior is undefined if list[i+1] is less than list[i] for any i in the range i ≥ 0 and
i<count.
Notes
glDrawArraySethp is a Hewlett-Packard GL version 1.1 extension.