A common use case in GL for some applications is to be able to draw the same object, or groups of similar objects that share vertex data, primitive count and type, multiple times. This extension provides a means of accelerating such use cases while reducing the number of API calls, and keeping the amount of duplicate data to a minimum.
This extension introduces an array "divisor" for generic vertex array attributes, which when non-zero specifies that the attribute is "instanced." An
instanced attribute does not advance per-vertex as usual, but rather after every divisor conceptual draw calls.
(Attributes which aren't instanced are repeated in their entirety for every conceptual draw call.)
By specifying transform data in an instanced attribute or series of instanced attributes, vertex shaders can, in concert with the instancing draw calls, draw multiple instances of an object with one draw call.
Requires GLES 2..
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT
Accepted by the |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public static native void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static void | |
| public static native void | |
| public static native void |
| GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT | back to summary |
|---|---|
| public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_EXT Accepted by the | |
| EXTInstancedArrays | back to summary |
|---|---|
| protected EXTInstancedArrays() | |
| glDrawArraysInstancedEXT | back to summary |
|---|---|
| public static native void glDrawArraysInstancedEXT(int mode, int start, int count, int primcount) | |
| glDrawElementsInstancedEXT | back to summary |
|---|---|
| public static void glDrawElementsInstancedEXT(int mode, int count, int type, long indices, int primcount) | |
| glDrawElementsInstancedEXT | back to summary |
|---|---|
| public static void glDrawElementsInstancedEXT(int mode, int type, ByteBuffer indices, int primcount) | |
| glDrawElementsInstancedEXT | back to summary |
|---|---|
| public static void glDrawElementsInstancedEXT(int mode, ByteBuffer indices, int primcount) | |
| glDrawElementsInstancedEXT | back to summary |
|---|---|
| public static void glDrawElementsInstancedEXT(int mode, ShortBuffer indices, int primcount) | |
| glDrawElementsInstancedEXT | back to summary |
|---|---|
| public static void glDrawElementsInstancedEXT(int mode, IntBuffer indices, int primcount) | |
| glVertexAttribDivisorEXT | back to summary |
|---|---|
| public static native void glVertexAttribDivisorEXT(int index, int divisor) | |
| nglDrawElementsInstancedEXT | back to summary |
|---|---|
| public static native void nglDrawElementsInstancedEXT(int mode, int count, int type, long indices, int primcount) | |