struct Gloop::VertexArray::Binding
- Gloop::VertexArray::Binding
- Struct
- Value
- Object
Overview
Vertex buffer binding and attribute slot for the currently bound vertex array.
These slots can be used to associate vertex buffers and attribute formats together.
See: AttributeFormat, Attribute
Included Modules
- Gloop::Contextual
- Gloop::Parameters
Defined in:
gloop/vertex_array/binding.crConstructors
-
.new(context : Context, name : Name, index : UInt32)
Creates a reference to a binding slot in a vertex array.
Instance Method Summary
-
#attribute=(attribute : Attribute)
Binds an attribute to the slot.
-
#bind_vertex_buffer(buffer : Buffer, offset : Size, stride : Int32) : Nil
Binds a vertex buffer to the slot.
-
#divisor : UInt32
Retrieves the instance frequency of the attribute bound to this slot.
-
#divisor=(divisor : UInt32)
Sets the instance frequency for the attribute bound to this slot.
-
#index : UInt32
Index of this binding slot.
-
#offset : Int64
Retrieves the byte offset to the first value of the attribute bound to this slot.
-
#stride : Int32
Retrieves the byte distance between values of the attribute bound to this slot.
Constructor Detail
Creates a reference to a binding slot in a vertex array.
Instance Method Detail
Binds an attribute to the slot.
- OpenGL function:
glVertexArrayAttribBinding - OpenGL version: 4.5
Binds a vertex buffer to the slot.
- OpenGL function:
glVertexArrayVertexBuffer - OpenGL version: 4.5
Retrieves the instance frequency of the attribute bound to this slot.
- OpenGL function:
glGetVertexArrayIndexediv - OpenGL enum:
GL_VERTEX_BINDING_DIVISOR - OpenGL version: 4.5
Sets the instance frequency for the attribute bound to this slot.
- OpenGL function
glVertexArrayBindingDivisor - OpenGL version: 4.5
Retrieves the byte offset to the first value of the attribute bound to this slot.
- OpenGL function:
glGetVertexArrayIndexed64iv - OpenGL enum:
GL_VERTEX_BINDING_OFFSET - OpenGL version: 4.5
Retrieves the byte distance between values of the attribute bound to this slot.
- OpenGL function:
glGetVertexArrayIndexediv - OpenGL enum:
GL_VERTEX_BINDING_STRIDE - OpenGL version: 4.5