Class ANGLEInstancedArrays
- java.lang.Object
-
- org.lwjgl.opengles.ANGLEInstancedArrays
-
public class ANGLEInstancedArrays extends java.lang.Object
Native bindings to the ANGLE_instanced_arrays extension.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 restricting 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.0
.
-
-
Field Summary
Fields Modifier and Type Field Description static int
GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
Accepted by thepname
parameters of GetVertexAttribfv and GetVertexAttribiv.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void
glDrawArraysInstancedANGLE(int mode, int first, int count, int primcount)
static void
glDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)
static void
glDrawElementsInstancedANGLE(int mode, int type, java.nio.ByteBuffer indices, int primcount)
static void
glDrawElementsInstancedANGLE(int mode, java.nio.ByteBuffer indices, int primcount)
static void
glDrawElementsInstancedANGLE(int mode, java.nio.IntBuffer indices, int primcount)
static void
glDrawElementsInstancedANGLE(int mode, java.nio.ShortBuffer indices, int primcount)
static void
glVertexAttribDivisorANGLE(int index, int divisor)
static void
nglDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)
-
-
-
Field Detail
-
GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
Accepted by thepname
parameters of GetVertexAttribfv and GetVertexAttribiv.- See Also:
- Constant Field Values
-
-
Method Detail
-
glDrawArraysInstancedANGLE
public static void glDrawArraysInstancedANGLE(int mode, int first, int count, int primcount)
-
nglDrawElementsInstancedANGLE
public static void nglDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)
-
glDrawElementsInstancedANGLE
public static void glDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)
-
glDrawElementsInstancedANGLE
public static void glDrawElementsInstancedANGLE(int mode, int type, java.nio.ByteBuffer indices, int primcount)
-
glDrawElementsInstancedANGLE
public static void glDrawElementsInstancedANGLE(int mode, java.nio.ByteBuffer indices, int primcount)
-
glDrawElementsInstancedANGLE
public static void glDrawElementsInstancedANGLE(int mode, java.nio.ShortBuffer indices, int primcount)
-
glDrawElementsInstancedANGLE
public static void glDrawElementsInstancedANGLE(int mode, java.nio.IntBuffer indices, int primcount)
-
glVertexAttribDivisorANGLE
public static void glVertexAttribDivisorANGLE(int index, int divisor)
-
-