VoltAir
|
A list of vertex attributes. More...
Public Member Functions | |
AttributeSet () | |
Constructs an empty attribute set. More... | |
AttributeSet (std::initializer_list< Attribute > list) | |
Constructs an attribute set from an initializer list. More... | |
AttributeSet (const std::vector< Attribute > &list) | |
Constructs an attribute set from a vector of attributes. More... | |
void | computeAttributeOffsets () |
Computes and fills in this attribute set's attribute offsets and vertex stride. More... | |
Public Attributes | |
std::vector< Attribute > | attributes |
List of attribute definitions. More... | |
int | vertexStride = 0 |
Number of bytes between vertices. More... | |
std::vector< int > | attributeOffsets |
Number of bytes from the beginning of a vertex for each attribute. More... | |
A list of vertex attributes.
Used by shaders and meshes. The attributes of a mesh determine what data it stores in its vertices. The attributes of a shader describe which attributes it reads as inputs.
AttributeSet::AttributeSet | ( | ) |
Constructs an empty attribute set.
|
explicit |
Constructs an attribute set from an initializer list.
This constructor calls computeAttributeOffsets() to compute this object's metadata.
list | Initializer list containing attributes to add to this set |
|
explicit |
Constructs an attribute set from a vector of attributes.
This constructor calls computeAttributeOffsets() to compute this object's metadata.
list | List of attributes to add to this set |
void AttributeSet::computeAttributeOffsets | ( | ) |
Computes and fills in this attribute set's attribute offsets and vertex stride.
std::vector<int> AttributeSet::attributeOffsets |
Number of bytes from the beginning of a vertex for each attribute.
This is computed by computeAttributeOffsets().
std::vector<Attribute> AttributeSet::attributes |
List of attribute definitions.
int AttributeSet::vertexStride = 0 |
Number of bytes between vertices.
This is computed by computeAttributeOffsets().