struct Gloop::VertexArray::CurrentBinding
- Gloop::VertexArray::CurrentBinding
- 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
, Gloop::Attribute
Included Modules
- Gloop::Contextual
- Gloop::Parameters
Defined in:
gloop/vertex_array/current_binding.crConstructors
-
.new(context : Context, index : UInt32)
Creates a reference to a binding slot in the currently bound vertex array.
Instance Method Summary
-
#attribute=(attribute : Gloop::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 the currently bound vertex array.
Instance Method Detail
Binds an attribute to the slot.
- OpenGL function:
glVertexAttribBinding
- OpenGL version: 4.3
Binds a vertex buffer to the slot.
- OpenGL function:
glBindVertexBuffer
- OpenGL version: 4.3
Retrieves the instance frequency of the attribute bound to this slot.
- OpenGL function:
glGetIntegeri_v
- OpenGL enum:
GL_VERTEX_BINDING_DIVISOR
- OpenGL version: 4.3
Sets the instance frequency for the attribute bound to this slot.
- OpenGL function
glVertexBindingDivisor
- OpenGL version: 4.3
Retrieves the byte offset to the first value of the attribute bound to this slot.
- OpenGL function:
glGetInteger64i_v
- OpenGL enum:
GL_VERTEX_BINDING_OFFSET
- OpenGL version: 4.3
Retrieves the byte distance between values of the attribute bound to this slot.
- OpenGL function:
glGetIntegeri_v
- OpenGL enum:
GL_VERTEX_BINDING_STRIDE
- OpenGL version: 4.3