Class ARBBaseInstance

java.lang.Object
org.lwjgl.opengl.ARBBaseInstance

public class ARBBaseInstance extends Object
Native bindings to the ARB_base_instance extension.

This extension allows the offset within buffer objects used for instanced rendering to be specified. This is congruent with the first parameter in DrawArrays and the basevertex parameter in DrawElements. When instanced rendering is performed (for example, through DrawArraysInstanced), instanced vertex attributes whose vertex attribute divisors are non-zero are fetched from enabled vertex arrays per-instance rather than per-vertex. However, in unextended OpenGL, there is no way to define the offset into those arrays from which the attributes are fetched. This extension adds that offset in the form of a <baseinstance> parameter to several new procedures.

The baseinstance parameter is added to the index of the array element, after division by the vertex attribute divisor. This allows several sets of instanced vertex attribute data to be stored in a single vertex array, and the base offset of that data to be specified for each draw. Further, this extension exposes the <baseinstance> parameter as the final and previously undefined structure member of the draw-indirect data structure.

Requires OpenGL 3.1 or ARB_draw_instanced. Promoted to core in OpenGL 4.2.