Store vertex attribute layout.
More...
#include <VertexLayout.h>
|
void | setAttrib (std::string_view name, std::size_t index, VertexFormat format, std::size_t offset, bool needNormalized) |
| Set attribute values to name.
|
|
void | setStride (std::size_t stride) |
| Set stride of vertices.
|
|
std::size_t | getStride () const |
| Get the distance between the data of two vertices, in bytes.
|
|
VertexStepMode | getVertexStepMode () const |
| Get vertex step function.
|
|
const hlookup::string_map< Attribute > & | getAttributes () const |
| Get attribute informations.
|
|
bool | isValid () const |
| Check if vertex layout has been set.
|
|
Store vertex attribute layout.
◆ setAttrib()
void setAttrib |
( |
std::string_view | name, |
|
|
std::size_t | index, |
|
|
VertexFormat | format, |
|
|
std::size_t | offset, |
|
|
bool | needNormalized ) |
Set attribute values to name.
- Parameters
-
name | Specifies the attribute name. |
index | Specifies the index of the generic vertex attribute to be modified. |
format | Specifies how the vertex attribute data is laid out in memory. |
offset | Specifies the byte offset to the first component of the first generic vertex attribute. |
needToBeNormallized | Specifies whether fixed-point data values should be normalized (true) or converted directly as fixed-point values (false) when they are accessed. |
◆ setStride()
void setStride |
( |
std::size_t | stride | ) |
|
Set stride of vertices.
- Parameters
-
stride | Specifies the distance between the data of two vertices, in bytes. |
◆ getStride()
std::size_t getStride |
( |
| ) |
const |
|
inline |
Get the distance between the data of two vertices, in bytes.
- Returns
- The distance between the data of two vertices, in bytes.
◆ getVertexStepMode()
VertexStepMode getVertexStepMode |
( |
| ) |
const |
|
inline |
Get vertex step function.
Default value is VERTEX.
- Returns
- Vertex step function.
- Note
- Used in metal.
◆ getAttributes()
const hlookup::string_map< Attribute > & getAttributes |
( |
| ) |
const |
|
inline |
Get attribute informations.
- Returns
- Atrribute informations.
The documentation for this class was generated from the following file: