GLMULTIDRAWELEMENTS(3G)

    .SH "NAME" glMultiDrawElements - render multiple sets of primitives by specifying indices of array data elements
    .SH "C SPECIFICATION"

            .HP u void glMultiDrawElements(GLenum mode, const GLsizei * count, GLenum type, const void * const * indices, GLsizei drawcount);

    .SH "PARAMETERS"

        .PP mode

                    Specifies what kind of primitives to render. Symbolic constants GL_POINTS, GL_LINE_STRIP, GL_LINE_LOOP, GL_LINES, GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP, GL_TRIANGLE_FAN, GL_TRIANGLES, GL_TRIANGLE_STRIP_ADJACENCY, GL_TRIANGLES_ADJACENCY and GL_PATCHES are accepted.

            .RE
            .PP count

                        Points to an array of the elements counts.

                .RE
                .PP type

                            Specifies the type of the values in indices. Must be one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT, or GL_UNSIGNED_INT.

                    .RE
                    .PP indices

                                Specifies a pointer to the location where the indices are stored.

                        .RE
                        .PP drawcount

                                    Specifies the size of the count and indices arrays.

                            .RE

                        .SH "DESCRIPTION"
                            .PP glMultiDrawElements specifies multiple sets of geometric primitives with very few subroutine calls. Instead of calling a GL function to pass each individual vertex, normal, texture coordinate, edge flag, or color, you can prespecify separate arrays of vertices, normals, and so on, and use them to construct a sequence of primitives with a single call to glMultiDrawElements.
                            .PP glMultiDrawElements is identical in operation to glDrawElements() except that drawcount separate lists of elements are specified.
                            .PP Vertex attributes that are modified by glMultiDrawElements have an unspecified value after glMultiDrawElements returns. Attributes that aren't modified maintain their previous values.

                        .SH "NOTES"
                            .PP GL_LINE_STRIP_ADJACENCY, GL_LINES_ADJACENCY, GL_TRIANGLE_STRIP_ADJACENCY and GL_TRIANGLES_ADJACENCY are available only if the GL version is 3.2 or greater.

                        .SH "ERRORS"
                            .PP GL_INVALID_ENUM is generated if mode is not an accepted value.
                            .PP GL_INVALID_VALUE is generated if drawcount is negative.
                            .PP GL_INVALID_OPERATION is generated if a non-zero buffer object name is bound to an enabled array or the element array and the buffer object's data store is currently mapped.

                        .SH "VERSION SUPPORT"
                            .TS allbox tab(:); lB cB s s s s s s s s s s s lB cB cB cB cB cB cB cB cB cB cB cB cB. T{ T}:T{ OpenGL Version T} T{ Function / Feature Name T}:T{ 2.0 T}:T{ 2.1 T}:T{ 3.0 T}:T{ 3.1 T}:T{ 3.2 T}:T{ 3.3 T}:T{ 4.0 T}:T{ 4.1 T}:T{ 4.2 T}:T{ 4.3 T}:T{ 4.4 T}:T{ 4.5 T} l c c c c c c c c c c c c. T{ glMultiDrawElements T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}:T{ ✔ T}

                        .SH "SEE ALSO"
                            .PP glDrawArrays(), glDrawRangeElements()

                        .SH "COPYRIGHT"
                            .PP Copyright © 1991-2006 Silicon Graphics, Inc. Copyright © 2010-2014 Khronos Group. This document is licensed under the SGI Free Software B License. For details, see https://khronos.org/registry/OpenGL-Refpages/LICENSES/LicenseRef-FreeB.txt.

COPYRIGHT
Copyright © 2010-2014 Khronos Group