public class ARBVertexAttribBinding
extends java.lang.Object
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.
| Modifier and Type | Field and Description |
|---|---|
static int |
GL_MAX_VERTEX_ATTRIB_BINDINGS
Accepted by the
pname parameter of GetIntegerv, .... |
static int |
GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET
Accepted by the
pname parameter of GetIntegerv, .... |
static int |
GL_VERTEX_ATTRIB_BINDING
Accepted by the
pname parameter of GetVertexAttrib*v. |
static int |
GL_VERTEX_ATTRIB_RELATIVE_OFFSET
Accepted by the
pname parameter of GetVertexAttrib*v. |
static int |
GL_VERTEX_BINDING_BUFFER
Accepted by the
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. |
static int |
GL_VERTEX_BINDING_DIVISOR
Accepted by the
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. |
static int |
GL_VERTEX_BINDING_OFFSET
Accepted by the
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. |
static int |
GL_VERTEX_BINDING_STRIDE
Accepted by the
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v. |
| Modifier and Type | Method and Description |
|---|---|
static void |
glBindVertexBuffer(int bindingindex,
int buffer,
long offset,
int stride)
Binds a buffer to a vertex buffer bind point.
|
static void |
glVertexArrayBindVertexBufferEXT(int vaobj,
int bindingindex,
int buffer,
long offset,
int stride)
DSA version of
BindVertexBuffer. |
static void |
glVertexArrayVertexAttribBindingEXT(int vaobj,
int attribindex,
int bindingindex)
DSA version of
VertexAttribBinding. |
static void |
glVertexArrayVertexAttribFormatEXT(int vaobj,
int attribindex,
int size,
int type,
boolean normalized,
int relativeoffset)
DSA version of
VertexAttribFormat. |
static void |
glVertexArrayVertexAttribIFormatEXT(int vaobj,
int attribindex,
int size,
int type,
int relativeoffset)
DSA version of
VertexAttribIFormat. |
static void |
glVertexArrayVertexAttribLFormatEXT(int vaobj,
int attribindex,
int size,
int type,
int relativeoffset)
DSA version of
VertexAttribLFormat. |
static void |
glVertexArrayVertexBindingDivisorEXT(int vaobj,
int bindingindex,
int divisor)
DSA version of
VertexBindingDivisor. |
static void |
glVertexAttribBinding(int attribindex,
int bindingindex)
Associate a vertex attribute and a vertex buffer binding.
|
static void |
glVertexAttribFormat(int attribindex,
int size,
int type,
boolean normalized,
int relativeoffset)
Specifies the organization of data in vertex arrays.
|
static void |
glVertexAttribIFormat(int attribindex,
int size,
int type,
int relativeoffset)
Specifies the organization of pure integer data in vertex arrays.
|
static void |
glVertexAttribLFormat(int attribindex,
int size,
int type,
int relativeoffset)
Specifies the organization of 64-bit double data in vertex arrays.
|
static void |
glVertexBindingDivisor(int bindingindex,
int divisor)
Modifies the rate at which generic vertex attributes advance during instanced rendering.
|
public static final int GL_VERTEX_ATTRIB_BINDING
pname parameter of GetVertexAttrib*v.public static final int GL_VERTEX_ATTRIB_RELATIVE_OFFSET
pname parameter of GetVertexAttrib*v.public static final int GL_VERTEX_BINDING_DIVISOR
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.public static final int GL_VERTEX_BINDING_OFFSET
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.public static final int GL_VERTEX_BINDING_STRIDE
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.public static final int GL_VERTEX_BINDING_BUFFER
target parameter of GetBooleani_v, GetIntegeri_v, GetFloati_v, GetDoublei_v, and GetInteger64i_v.public static final int GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET
pname parameter of GetIntegerv, ....public static final int GL_MAX_VERTEX_ATTRIB_BINDINGS
pname parameter of GetIntegerv, ....public static void glBindVertexBuffer(int bindingindex,
int buffer,
long offset,
int stride)
bindingindex - the index of the vertex buffer binding point to which to bind the bufferbuffer - the name of an existing buffer to bind to the vertex buffer binding pointoffset - the offset of the first element of the bufferstride - the distance between elements within the bufferpublic static void glVertexAttribFormat(int attribindex,
int size,
int type,
boolean normalized,
int relativeoffset)
attribindex - the generic vertex attribute array being describedsize - the number of values per vertex that are stored in the array. One of:| 1 | 2 | 3 | 4 | BGRA |
type - the type of the data stored in the arraynormalized - 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 - the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches frompublic static void glVertexAttribIFormat(int attribindex,
int size,
int type,
int relativeoffset)
attribindex - the generic vertex attribute array being describedsize - the number of values per vertex that are stored in the array. One of:| 1 | 2 | 3 | 4 | BGRA |
type - the type of the data stored in the arrayrelativeoffset - the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches frompublic static void glVertexAttribLFormat(int attribindex,
int size,
int type,
int relativeoffset)
attribindex - the generic vertex attribute array being describedsize - the number of values per vertex that are stored in the array. One of:| 1 | 2 | 3 | 4 | BGRA |
type - the type of the data stored in the arrayrelativeoffset - the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches frompublic static void glVertexAttribBinding(int attribindex,
int bindingindex)
attribindex - the index of the attribute to associate with a vertex buffer bindingbindingindex - the index of the vertex buffer binding with which to associate the generic vertex attributepublic static void glVertexBindingDivisor(int bindingindex,
int divisor)
bindingindex - the index of the generic vertex attributedivisor - the number of instances that will pass between updates of the generic attribute at slot indexpublic static void glVertexArrayBindVertexBufferEXT(int vaobj,
int bindingindex,
int buffer,
long offset,
int stride)
BindVertexBuffer.vaobj - the vertex array objectbindingindex - the index of the vertex buffer binding point to which to bind the bufferbuffer - the name of an existing buffer to bind to the vertex buffer binding pointoffset - the offset of the first element of the bufferstride - the distance between elements within the bufferpublic static void glVertexArrayVertexAttribFormatEXT(int vaobj,
int attribindex,
int size,
int type,
boolean normalized,
int relativeoffset)
VertexAttribFormat.vaobj - the vertex array objectattribindex - the generic vertex attribute array being describedsize - the number of values per vertex that are stored in the array. One of:| 1 | 2 | 3 | 4 | BGRA |
type - the type of the data stored in the arraynormalized - 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 - the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches frompublic static void glVertexArrayVertexAttribIFormatEXT(int vaobj,
int attribindex,
int size,
int type,
int relativeoffset)
VertexAttribIFormat.vaobj - the vertex array objectattribindex - the generic vertex attribute array being describedsize - the number of values per vertex that are stored in the array. One of:| 1 | 2 | 3 | 4 | BGRA |
type - the type of the data stored in the arrayrelativeoffset - the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches frompublic static void glVertexArrayVertexAttribLFormatEXT(int vaobj,
int attribindex,
int size,
int type,
int relativeoffset)
VertexAttribLFormat.vaobj - the vertex array objectattribindex - the generic vertex attribute array being describedsize - the number of values per vertex that are stored in the array. One of:| 1 | 2 | 3 | 4 | BGRA |
type - the type of the data stored in the arrayrelativeoffset - the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches frompublic static void glVertexArrayVertexAttribBindingEXT(int vaobj,
int attribindex,
int bindingindex)
VertexAttribBinding.vaobj - the vertex array objectattribindex - the index of the attribute to associate with a vertex buffer bindingbindingindex - the index of the vertex buffer binding with which to associate the generic vertex attributepublic static void glVertexArrayVertexBindingDivisorEXT(int vaobj,
int bindingindex,
int divisor)
VertexBindingDivisor.vaobj - the vertex array objectbindingindex - the index of the generic vertex attributedivisor - the number of instances that will pass between updates of the generic attribute at slot indexCopyright LWJGL. All Rights Reserved. License terms.