Class ARBVertexAttribBinding



  • public class ARBVertexAttribBinding
    extends java.lang.Object
    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:

    • An array of vertex buffer binding points, each of which specifies:
      • a bound buffer object
      • a starting offset for the vertex attribute data in that buffer object
      • a stride used by all attributes using that binding point, and
      • a frequency divisor used by all attributes using that binding point.
    • An array of generic vertex attribute format information records, each of which specifies:
      • a reference to one of the new buffer binding points above
      • a component count and format, and a normalization flag for the attribute data, and
      • the offset of the attribute data relative to the base offset of each vertex found at the associated binding point.

    Promoted to core in OpenGL 4.3.

    • Method Detail

      • glBindVertexBuffer

        public static void glBindVertexBuffer(int bindingindex,
                                              int buffer,
                                              long offset,
                                              int stride)
        Binds a buffer to a vertex buffer bind point.
        Parameters:
        bindingindex - the index of the vertex buffer binding point to which to bind the buffer
        buffer - the name of an existing buffer to bind to the vertex buffer binding point
        offset - the offset of the first element of the buffer
        stride - the distance between elements within the buffer
      • glVertexAttribFormat

        public static void glVertexAttribFormat(int attribindex,
                                                int size,
                                                int type,
                                                boolean normalized,
                                                int relativeoffset)
        Specifies the organization of data in vertex arrays.
        Parameters:
        attribindex - the generic vertex attribute array being described
        size - the number of values per vertex that are stored in the array. One of:
        1234BGRA
        type - the type of the data stored in the array
        normalized - 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 from
      • glVertexAttribIFormat

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

        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 - the generic vertex attribute array being described
        size - the number of values per vertex that are stored in the array. One of:
        1234BGRA
        type - the type of the data stored in the array
        relativeoffset - the offset, measured in basic machine units of the first element relative to the start of the vertex buffer binding this attribute fetches from
      • glVertexAttribBinding

        public static void glVertexAttribBinding(int attribindex,
                                                 int bindingindex)
        Associate a vertex attribute and a vertex buffer binding.
        Parameters:
        attribindex - the index of the attribute to associate with a vertex buffer binding
        bindingindex - the index of the vertex buffer binding with which to associate the generic vertex attribute
      • glVertexBindingDivisor

        public static void glVertexBindingDivisor(int bindingindex,
                                                  int divisor)
        Modifies the rate at which generic vertex attributes advance during instanced rendering.
        Parameters:
        bindingindex - the index of the generic vertex attribute
        divisor - the number of instances that will pass between updates of the generic attribute at slot index
      • glVertexArrayBindVertexBufferEXT

        public static void glVertexArrayBindVertexBufferEXT(int vaobj,
                                                            int bindingindex,
                                                            int buffer,
                                                            long offset,
                                                            int stride)
        DSA version of BindVertexBuffer.
        Parameters:
        vaobj - the vertex array object
        bindingindex - the index of the vertex buffer binding point to which to bind the buffer
        buffer - the name of an existing buffer to bind to the vertex buffer binding point
        offset - the offset of the first element of the buffer
        stride - the distance between elements within the buffer
      • glVertexArrayVertexAttribFormatEXT

        public static void glVertexArrayVertexAttribFormatEXT(int vaobj,
                                                              int attribindex,
                                                              int size,
                                                              int type,
                                                              boolean normalized,
                                                              int relativeoffset)
        DSA version of VertexAttribFormat.
        Parameters:
        vaobj - the vertex array object
        attribindex - the generic vertex attribute array being described
        size - the number of values per vertex that are stored in the array. One of:
        1234BGRA
        type - the type of the data stored in the array
        normalized - 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 from
      • glVertexArrayVertexAttribIFormatEXT

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

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

        public static void glVertexArrayVertexAttribBindingEXT(int vaobj,
                                                               int attribindex,
                                                               int bindingindex)
        DSA version of VertexAttribBinding.
        Parameters:
        vaobj - the vertex array object
        attribindex - the index of the attribute to associate with a vertex buffer binding
        bindingindex - the index of the vertex buffer binding with which to associate the generic vertex attribute
      • glVertexArrayVertexBindingDivisorEXT

        public static void glVertexArrayVertexBindingDivisorEXT(int vaobj,
                                                                int bindingindex,
                                                                int divisor)
        DSA version of VertexBindingDivisor.
        Parameters:
        vaobj - the vertex array object
        bindingindex - the index of the generic vertex attribute
        divisor - the number of instances that will pass between updates of the generic attribute at slot index