Store vertex attribute layout.
More...
|
void | setAttribute (const std::string &name, std::size_t index, VertexFormat format, std::size_t offset, bool needToBeNormallized) |
| Set attribute values to name.
|
|
void | setLayout (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 std::unordered_map
< std::string, Attribute > & | getAttributes () const |
| Get attribute informations.
|
|
bool | isValid () const |
| Check if vertex layout has been set.
|
|
Store vertex attribute layout.
void setAttribute |
( |
const std::string & |
name, |
|
|
std::size_t |
index, |
|
|
VertexFormat |
format, |
|
|
std::size_t |
offset, |
|
|
bool |
needToBeNormallized |
|
) |
| |
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. |
void setLayout |
( |
std::size_t |
stride | ) |
|
Set stride of vertices.
- Parameters
-
stride | Specifies the distance between the data of two vertices, in bytes. |
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.
VertexStepMode getVertexStepMode |
( |
| ) |
const |
|
inline |
Get vertex step function.
Default value is VERTEX.
- Returns
- Vertex step function.
- Note
- Used in metal.
const std::unordered_map<std::string, Attribute>& getAttributes |
( |
| ) |
const |
|
inline |
Get attribute informations.
- Returns
- Atrribute informations.
The documentation for this class was generated from the following file: