Top Description Fields Constructors Methods
org.lwjgl.opengl

public Class ARBVertexAttribBinding

extends Object
Class Inheritance
Imports
org.lwjgl.system.*

Native bindings to the ARB_vertex_attrib_binding extension.

OpenGL currently supports (at least) 16 vertex attributes and 16 vertex buffer bindings, with a fixed mapping between vertex attributes and vertex buffer bindings. This extension allows the application to change the mapping between attributes and bindings, which can make it more efficient to update vertex buffer bindings for interleaved vertex formats where many attributes share the same buffer.

This extension also separates the vertex binding update from the vertex attribute format update, which saves applications the effort of redundantly specifying the same format state over and over.

Conceptually, this extension splits the state for generic vertex attribute arrays into:

Promoted to core in OpenGL 4.3.

Field Summary

Modifier and TypeField and Description
public static final int
GL_MAX_VERTEX_ATTRIB_BINDINGS

Accepted by the pname parameter of GetIntegerv, ....

public static final int
GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET

Accepted by the pname parameter of GetIntegerv, ....

public static final int
GL_VERTEX_ATTRIB_BINDING

Accepted by the pname parameter of GetVertexAttrib*v.

public static final int
GL_VERTEX_ATTRIB_RELATIVE_OFFSET

Accepted by the pname parameter of GetVertexAttrib*v.

public static final int
GL_VERTEX_BINDING_BUFFER

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

public static final int
GL_VERTEX_BINDING_DIVISOR

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

public static final int
GL_VERTEX_BINDING_OFFSET

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

public static final int
GL_VERTEX_BINDING_STRIDE

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public static void
glBindVertexBuffer(int
the index of the vertex buffer binding point to which to bind the buffer
bindingindex
,
int
the name of an existing buffer to bind to the vertex buffer binding point
buffer
,
long
the offset of the first element of the buffer
offset
,
int
the distance between elements within the buffer
stride
)

Binds a buffer to a vertex buffer bind point.

public static native void
glVertexArrayBindVertexBufferEXT(int
the vertex array object
vaobj
,
int
the index of the vertex buffer binding point to which to bind the buffer
bindingindex
,
int
the name of an existing buffer to bind to the vertex buffer binding point
buffer
,
long
the offset of the first element of the buffer
offset
,
int
the distance between elements within the buffer
stride
)

DSA version of BindVertexBuffer.

public static native void
glVertexArrayVertexAttribBindingEXT(int
the vertex array object
vaobj
,
int
the index of the attribute to associate with a vertex buffer binding
attribindex
,
int
the index of the vertex buffer binding with which to associate the generic vertex attribute
bindingindex
)

DSA version of VertexAttribBinding.

public static native void
glVertexArrayVertexAttribFormatEXT(int
the vertex array object
vaobj
,
int
the generic vertex attribute array being described
attribindex
,
int
the number of values per vertex that are stored in the array. One of:
1234BGRA
size
,
int
the type of the data stored in the array
type
,
boolean
if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is directly converted to floating point.
normalized
,
int
the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from
relativeoffset
)

DSA version of VertexAttribFormat.

public static native void
glVertexArrayVertexAttribIFormatEXT(int
the vertex array object
vaobj
,
int
the generic vertex attribute array being described
attribindex
,
int
the number of values per vertex that are stored in the array. One of:
1234BGRA
size
,
int
the type of the data stored in the array
type
,
int
the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from
relativeoffset
)

DSA version of VertexAttribIFormat.

public static native void
glVertexArrayVertexAttribLFormatEXT(int
the vertex array object
vaobj
,
int
the generic vertex attribute array being described
attribindex
,
int
the number of values per vertex that are stored in the array. One of:
1234BGRA
size
,
int
the type of the data stored in the array
type
,
int
the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from
relativeoffset
)

DSA version of VertexAttribLFormat.

public static native void
glVertexArrayVertexBindingDivisorEXT(int
the vertex array object
vaobj
,
int
the index of the generic vertex attribute
bindingindex
,
int
the number of instances that will pass between updates of the generic attribute at slot index
divisor
)

DSA version of VertexBindingDivisor.

public static void
glVertexAttribBinding(int
the index of the attribute to associate with a vertex buffer binding
attribindex
,
int
the index of the vertex buffer binding with which to associate the generic vertex attribute
bindingindex
)

Associate a vertex attribute and a vertex buffer binding.

public static void
glVertexAttribFormat(int
the generic vertex attribute array being described
attribindex
,
int
the number of values per vertex that are stored in the array. One of:
1234BGRA
size
,
int
the type of the data stored in the array
type
,
boolean
if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is directly converted to floating point.
normalized
,
int
the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from
relativeoffset
)

Specifies the organization of data in vertex arrays.

public static void
glVertexAttribIFormat(int
the generic vertex attribute array being described
attribindex
,
int
the number of values per vertex that are stored in the array. One of:
1234BGRA
size
,
int
the type of the data stored in the array
type
,
int
the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from
relativeoffset
)

Specifies the organization of pure integer data in vertex arrays.

public static void
glVertexAttribLFormat(int
the generic vertex attribute array being described
attribindex
,
int
the number of values per vertex that are stored in the array. One of:
1234BGRA
size
,
int
the type of the data stored in the array
type
,
int
the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from
relativeoffset
)

Specifies the organization of 64-bit double data in vertex arrays.

public static void
glVertexBindingDivisor(int
the index of the generic vertex attribute
bindingindex
,
int
the number of instances that will pass between updates of the generic attribute at slot index
divisor
)

Modifies the rate at which generic vertex attributes advance during instanced rendering.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GL_MAX_VERTEX_ATTRIB_BINDINGSback to summary
public static final int GL_MAX_VERTEX_ATTRIB_BINDINGS

Accepted by the pname parameter of GetIntegerv, ....

GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSETback to summary
public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET

Accepted by the pname parameter of GetIntegerv, ....

GL_VERTEX_ATTRIB_BINDINGback to summary
public static final int GL_VERTEX_ATTRIB_BINDING

Accepted by the pname parameter of GetVertexAttrib*v.

GL_VERTEX_ATTRIB_RELATIVE_OFFSETback to summary
public static final int GL_VERTEX_ATTRIB_RELATIVE_OFFSET

Accepted by the pname parameter of GetVertexAttrib*v.

GL_VERTEX_BINDING_BUFFERback to summary
public static final int GL_VERTEX_BINDING_BUFFER

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

GL_VERTEX_BINDING_DIVISORback to summary
public static final int GL_VERTEX_BINDING_DIVISOR

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

GL_VERTEX_BINDING_OFFSETback to summary
public static final int GL_VERTEX_BINDING_OFFSET

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

GL_VERTEX_BINDING_STRIDEback to summary
public static final int GL_VERTEX_BINDING_STRIDE

Accepted by the target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.

Constructor Detail

ARBVertexAttribBindingback to summary
protected ARBVertexAttribBinding()

Method Detail

glBindVertexBufferback to summary
public static void glBindVertexBuffer(int bindingindex, int buffer, long offset, int stride)

Binds a buffer to a vertex buffer bind point.

Parameters
bindingindex:int

the index of the vertex buffer binding point to which to bind the buffer

buffer:int

the name of an existing buffer to bind to the vertex buffer binding point

offset:long

the offset of the first element of the buffer

stride:int

the distance between elements within the buffer

glVertexArrayBindVertexBufferEXTback to summary
public static native void glVertexArrayBindVertexBufferEXT(int vaobj, int bindingindex, int buffer, long offset, int stride)

DSA version of BindVertexBuffer.

Parameters
vaobj:int

the vertex array object

bindingindex:int

the index of the vertex buffer binding point to which to bind the buffer

buffer:int

the name of an existing buffer to bind to the vertex buffer binding point

offset:long

the offset of the first element of the buffer

stride:int

the distance between elements within the buffer

glVertexArrayVertexAttribBindingEXTback to summary
public static native void glVertexArrayVertexAttribBindingEXT(int vaobj, int attribindex, int bindingindex)

DSA version of VertexAttribBinding.

Parameters
vaobj:int

the vertex array object

attribindex:int

the index of the attribute to associate with a vertex buffer binding

bindingindex:int

the index of the vertex buffer binding with which to associate the generic vertex attribute

glVertexArrayVertexAttribFormatEXTback to summary
public static native void glVertexArrayVertexAttribFormatEXT(int vaobj, int attribindex, int size, int type, boolean normalized, int relativeoffset)

DSA version of VertexAttribFormat.

Parameters
vaobj:int

the vertex array object

attribindex:int

the generic vertex attribute array being described

size:int

the number of values per vertex that are stored in the array. One of:

1234BGRA
type:int

the type of the data stored in the array

normalized:boolean

if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is directly converted to floating point.

relativeoffset:int

the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from

glVertexArrayVertexAttribIFormatEXTback to summary
public static native void glVertexArrayVertexAttribIFormatEXT(int vaobj, int attribindex, int size, int type, int relativeoffset)

DSA version of VertexAttribIFormat.

Parameters
vaobj:int

the vertex array object

attribindex:int

the generic vertex attribute array being described

size:int

the number of values per vertex that are stored in the array. One of:

1234BGRA
type:int

the type of the data stored in the array

relativeoffset:int

the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from

glVertexArrayVertexAttribLFormatEXTback to summary
public static native void glVertexArrayVertexAttribLFormatEXT(int vaobj, int attribindex, int size, int type, int relativeoffset)

DSA version of VertexAttribLFormat.

Parameters
vaobj:int

the vertex array object

attribindex:int

the generic vertex attribute array being described

size:int

the number of values per vertex that are stored in the array. One of:

1234BGRA
type:int

the type of the data stored in the array

relativeoffset:int

the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from

glVertexArrayVertexBindingDivisorEXTback to summary
public static native void glVertexArrayVertexBindingDivisorEXT(int vaobj, int bindingindex, int divisor)

DSA version of VertexBindingDivisor.

Parameters
vaobj:int

the vertex array object

bindingindex:int

the index of the generic vertex attribute

divisor:int

the number of instances that will pass between updates of the generic attribute at slot index

glVertexAttribBindingback to summary
public static void glVertexAttribBinding(int attribindex, int bindingindex)

Associate a vertex attribute and a vertex buffer binding.

Parameters
attribindex:int

the index of the attribute to associate with a vertex buffer binding

bindingindex:int

the index of the vertex buffer binding with which to associate the generic vertex attribute

glVertexAttribFormatback to summary
public static void glVertexAttribFormat(int attribindex, int size, int type, boolean normalized, int relativeoffset)

Specifies the organization of data in vertex arrays.

Parameters
attribindex:int

the generic vertex attribute array being described

size:int

the number of values per vertex that are stored in the array. One of:

1234BGRA
type:int

the type of the data stored in the array

normalized:boolean

if true then integer data is normalized to the range [-1, 1] or [0, 1] if it is signed or unsigned, respectively. If false then integer data is directly converted to floating point.

relativeoffset:int

the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from

glVertexAttribIFormatback to summary
public static void glVertexAttribIFormat(int attribindex, int size, int type, int relativeoffset)

Specifies the organization of pure integer data in vertex arrays.

Parameters
attribindex:int

the generic vertex attribute array being described

size:int

the number of values per vertex that are stored in the array. One of:

1234BGRA
type:int

the type of the data stored in the array

relativeoffset:int

the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from

glVertexAttribLFormatback to summary
public static void glVertexAttribLFormat(int attribindex, int size, int type, int relativeoffset)

Specifies the organization of 64-bit double data in vertex arrays.

Parameters
attribindex:int

the generic vertex attribute array being described

size:int

the number of values per vertex that are stored in the array. One of:

1234BGRA
type:int

the type of the data stored in the array

relativeoffset:int

the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from

glVertexBindingDivisorback to summary
public static void glVertexBindingDivisor(int bindingindex, int divisor)

Modifies the rate at which generic vertex attributes advance during instanced rendering.

Parameters
bindingindex:int

the index of the generic vertex attribute

divisor:int

the number of instances that will pass between updates of the generic attribute at slot index