struct Gloop::VertexArray::Current
- Gloop::VertexArray::Current
- Struct
- Value
- Object
Overview
References the currently bound vertex array for a context.
This type should be used if direct state access (DSA) isn't available.
NOTE The currently bound vertex array is always referenced. If another vertex array is bound, then this will reference the newly bound instance.
Included Modules
- Gloop::Contextual
- Gloop::Parameters
Defined in:
gloop/vertex_array/current.crConstructors
-
.new(context : Gloop::Context)
Creates a resource associated with a context.
Instance Method Summary
-
#attributes : Gloop::Attributes
Information for all attributes in the bound vertex array.
-
#bind_attribute(attribute : Gloop::Attribute, to slot : UInt32)
Ties an attribute to a binding slot (index) to be associated with a vertex buffer.
-
#bind_vertex_buffer(buffer : Buffer, to slot : UInt32, offset : Size, stride : Int32)
Ties a vertex buffer to a binding slot (index) to be associated with an attribute.
-
#bindings : CurrentBindings
Information about vertex buffer and attribute binding slots.
-
#bound?
Checks if there is a vertex array currently bound.
-
#unbind : Nil
Unbinds any previously bound vertex array from the context.
Constructor Detail
Instance Method Detail
Ties an attribute to a binding slot (index) to be associated with a vertex buffer.
See: #bind_vertex_buffer
- OpenGL function:
glVertexAttribBinding
- OpenGL version: 4.3
Ties a vertex buffer to a binding slot (index) to be associated with an attribute.
See: #bind_attribute
- OpenGL function:
glBindVertexBuffer
- OpenGL version: 4.3
Unbinds any previously bound vertex array from the context.
- OpenGL function:
glBindVertexArray
- OpenGL version: 3.0