Top Description Fields Constructors Methods
org.lwjgl.opengles

public Class ANGLEInstancedArrays

extends Object
Class Inheritance
Imports
java.nio.*, org.lwjgl.system.*

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

Modifier and TypeField and Description
public static final int
GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE

Accepted by the pname parameters of GetVertexAttribfv and GetVertexAttribiv.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static native void
glDrawArraysInstancedANGLE(int mode, int first, int count, int primcount)

public static void
glDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)

public static void
glDrawElementsInstancedANGLE(int mode, int type, ByteBuffer indices, int primcount)

public static void
glDrawElementsInstancedANGLE(int mode, ByteBuffer indices, int primcount)

public static void
glDrawElementsInstancedANGLE(int mode, ShortBuffer indices, int primcount)

public static void
glDrawElementsInstancedANGLE(int mode, IntBuffer indices, int primcount)

public static native void
glVertexAttribDivisorANGLE(int index, int divisor)

public static native void
nglDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLEback to summary
public static final int GL_VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE

Accepted by the pname parameters of GetVertexAttribfv and GetVertexAttribiv.

Constructor Detail

ANGLEInstancedArraysback to summary
protected ANGLEInstancedArrays()

Method Detail

glDrawArraysInstancedANGLEback to summary
public static native void glDrawArraysInstancedANGLE(int mode, int first, int count, int primcount)
glDrawElementsInstancedANGLEback to summary
public static void glDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)
glDrawElementsInstancedANGLEback to summary
public static void glDrawElementsInstancedANGLE(int mode, int type, ByteBuffer indices, int primcount)
glDrawElementsInstancedANGLEback to summary
public static void glDrawElementsInstancedANGLE(int mode, ByteBuffer indices, int primcount)
glDrawElementsInstancedANGLEback to summary
public static void glDrawElementsInstancedANGLE(int mode, ShortBuffer indices, int primcount)
glDrawElementsInstancedANGLEback to summary
public static void glDrawElementsInstancedANGLE(int mode, IntBuffer indices, int primcount)
glVertexAttribDivisorANGLEback to summary
public static native void glVertexAttribDivisorANGLE(int index, int divisor)
nglDrawElementsInstancedANGLEback to summary
public static native void nglDrawElementsInstancedANGLE(int mode, int count, int type, long indices, int primcount)