[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]
OpenGL 1.2 for AIX: Reference Manual

glMultiModeDrawElementsIBM Subroutine

Purpose

Renders primitives of multiple primitive types from array data.

Library

OpenGL C bindings library: libGL.a

C Syntax

void glMultiModeDrawElementsIBM(GLenum  *mode,
      GLsizei  *count,
      GLenum  type,
      const GLvoid  **indices,
      GLsizei  primcount,
      GLint  modestride)

Parameters

mode Points to an array of primitive modes, Specifying 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.
count Points to an array of the element counts. Each count specifies the number of elements to be rendered for that primitive.
type Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.
indices Specifies a pointer to the list of index arrays.
primcount Specifies the number of elements to be read from the mode array and from the count array (and how many arrays there are in the indices list). Each such (mode,count,indices[]) triple tells us how many vertices of the indicated mode are to be rendered, and the location of their array of indices.

Description

glMultiModeDrawElementsIBM behaves identically to glDrawElements except that a list of arrays and a list of primitive modes is specified instead. The number of lists is specified in the primcount parameter. It has the same effect as:

        for(i=0; i < primcount; i++) {
            if (*(count+i) > 0) 
                glDrawElements(*((GLenum *)((char *)mode+i*modestride)), 
                             *(count+i), 
                             type,
                             *(indices+i));
        }

Notes

The glMultiModeDrawElementsIBM subroutine is available only if the IBM_multimode_draw_arrays extension is supported.

The glMultiModeDrawElementsIBM subroutine is included in display lists. If glMultiModeDrawElementsIBM 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

GL_INVALID_ENUM is generated if mode is not an accepted value.

GL_INVALID_OPERATION is generated if glMultiModeDrawElementsIBM is executed between the execution of glBegin and the corresponding glEnd.

Related Information

The glArrayElement subroutine, glColorPointer subroutine, glColorPointerListIBM subroutine, glDrawArrays subroutine, glEdgeFlagPointer glEdgeFlagPointerListIBM subroutine, glGetPointerv subroutine, glIndexPointer subroutine, glIndexPointerListIBM subroutine, glMultiModeDrawArraysIBM subroutine, glNormalPointer subroutine, glNormalPointerListIBM subroutine, glTexCoordPointer glTexCoordPointerListIBM subroutine, glVertexPointer subroutine, glVertexPointerListIBM subroutine.


[ Next Article | Previous Article | Book Contents | Library Home | Legal | Search ]