struct Gloop::VertexArray::Attribute
- Gloop::VertexArray::Attribute
- Struct
- Value
- Object
Overview
Information about a vertex attribute from a vertex array.
This type uses direct state access (DSA). Ensure the OpenGL context supports this functionality prior to use.
Included Modules
- Gloop::Contextual
- Gloop::Parameters
Defined in:
gloop/vertex_array/attribute.crConstructors
-
.new(context : Context, name : Name, index : UInt32)
Creates the attribute reference.
Instance Method Summary
-
#disable : Nil
Disables the attribute in the vertex array.
-
#divisor : UInt32
Returns the frequency divisor for instanced rendering.
-
#enable : Nil
Enables the attribute in the vertex array.
-
#enabled? : Bool
Indicates whether the attribute is enabled for the vertex array.
-
#float64? : Bool
Indicates whether the attribute's data is a double-precision floating-point value on the GPU.
-
#format : AttributeFormat
Retrieves all format information about the attribute.
-
#format=(format : Float32AttributeFormat)
Sets the format of the attribute.
-
#format=(format : IntAttributeFormat)
Sets the format of the attribute.
-
#format=(format : Float64AttributeFormat)
Sets the format of the attribute.
-
#index : UInt32
Index of the attribute.
-
#integer? : Bool
Indicates whether the attribute's data is an integer on the GPU.
-
#normalized? : Bool
Indicates whether the attribute's value is normalized when converted to a float-point number.
-
#offset : Int64
Retrieves the offset to the first value of this attribute in the currently bound array buffer.
-
#relative_offset : UInt32
Retrieves the number of bytes from the start of the vertex buffer data to the first instance of this attribute.
-
#size
Retrieves the number of components in the attribute.
-
#specify_float64_format(size : Int32, relative_offset : UInt32, type : Float64AttributeFormat::Type = :float64) : Nil
Specifies the format of the attribute.
-
#specify_format(size : Int32, type : Float32AttributeFormat::Type, normalized : Bool, relative_offset : UInt32) : Nil
Specifies the format of the attribute.
-
#specify_int_format(size : Int32, type : IntAttributeFormat::Type, relative_offset : UInt32) : Nil
Specifies the format of the attribute.
-
#stride
Returns the number of bytes between attribute values in the buffer data.
-
#type : Gloop::Float32AttributeFormat::Type
Returns the attribute's data type.
Constructor Detail
Creates the attribute reference.
Instance Method Detail
Disables the attribute in the vertex array.
- OpenGL function:
glDisableVertexArrayAttrib
- OpenGL version: 4.5
Returns the frequency divisor for instanced rendering.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_DIVISOR
- OpenGL version: 4.5
Enables the attribute in the vertex array.
- OpenGL function:
glEnableVertexArrayAttrib
- OpenGL version: 4.5
Indicates whether the attribute is enabled for the vertex array.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_ENABLED
- OpenGL version: 4.5
Indicates whether the attribute's data is a double-precision floating-point value on the GPU.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_LONG
- OpenGL version: 4.5
Sets the format of the attribute.
The data will be 32-bit floating-point values on the GPU.
- OpenGL function:
glVertexArrayAttribFormat
- OpenGL version: 4.5
Sets the format of the attribute.
The data will be integer values on the GPU.
- OpenGL function:
glVertexArrayAttribIFormat
- OpenGL version: 4.5
Sets the format of the attribute.
The data will be 64-bit floating-point values on the GPU.
- OpenGL function:
glVertexArrayAttribLFormat
- OpenGL version: 4.5
Indicates whether the attribute's data is an integer on the GPU.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_INTEGER
- OpenGL version: 4.5
Indicates whether the attribute's value is normalized when converted to a float-point number.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_NORMALIZED
- OpenGL version: 4.5
Retrieves the offset to the first value of this attribute in the currently bound array buffer.
- OpenGL function:
glGetVertexArrayIndexed64iv
- OpenGL enum:
GL_VERTEX_BINDING_OFFSET
- OpenGL version: 4.5
Retrieves the number of bytes from the start of the vertex buffer data to the first instance of this attribute.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_RELATIVE_OFFSET
- OpenGL version: 4.5
Retrieves the number of components in the attribute.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_SIZE
- OpenGL version: 4.5
Specifies the format of the attribute.
The data will be 64-bit floating-point values on the GPU.
- OpenGL function:
glVertexArrayAttribLFormat
- OpenGL version: 4.5
Specifies the format of the attribute.
The data will be 32-bit floating-point values on the GPU.
- OpenGL function:
glVertexArrayAttribFormat
- OpenGL version: 4.5
Specifies the format of the attribute.
The data will be integer values on the GPU.
- OpenGL function:
glVertexArrayAttribIFormat
- OpenGL version: 4.5
Returns the number of bytes between attribute values in the buffer data.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_STRIDE
- OpenGL version: 4.5
Returns the attribute's data type.
- OpenGL function:
glGetVertexArrayIndexediv
- OpenGL enum:
GL_VERTEX_ATTRIB_ARRAY_TYPE
- OpenGL version: 4.5