[Front] [Reference] [Imp. Guide] [Index]

[Prev] [Next]

glDrawArraySetHP: render multiple primitives from array data.

C Specification | Parameters | Description | Notes | Errors | See Also

[Up] C Specification

void glDrawArraySetHP(
    GLenum	 mode,
    const GLint* list,
    GLsizei	 count)

[Up] Parameters

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.
Points to an array of starting indices in the enabled arrays.
Specifies the number of groups of primitives to be rendered.

[Up] 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.le.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.ge.0 and i<count.

[Up] Notes

glDrawArraySetHP is a Hewlett-Packard GL version 1.1 extenion.

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

[Up] Errors

[Up] See Also


[Prev] [Next]
Front Reference [Imp. Guide] Index