GL_EXT_multi_draw_arrays#

Supported Hardware#

Series5, Series5XT, Series6, Series6XE, Series6XT

Valid APIs#

OpenGL ES 1.x, 2.0, 3.x

Description#

This extension adds two new functions to OpenGL ES; glMultiDrawArrays and glMultiDrawElements. These functions perform the same tasks as glDrawArrays/Elements, but also allow the users to render multiple primitive groups in one function call. In other words, one “glMultiDrawArrays” is equivalent to multiple “glDrawArrays” with the same rendering state.

Example#

// Setup lists of buffer offsets and triangle counts
GLint firsts[] = {0, 32};
GLsizei counts[] = {32, 32};
// If multiple vertex objects share the same draw state (blending, depth testing, shaders,
// textures, etc.) then multi-draw can be called on them all at once, rather than calling
// glDraw multiple times.
glMultiDrawArrays(GL_TRIANGLES, firsts, counts, 2);