Axmol Engine 2.4.0-258ceca
Loading...
Searching...
No Matches
VertexLayout Class Reference

Store vertex attribute layout. More...

#include <VertexLayout.h>

Public Member Functions

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.
 

Detailed Description

Store vertex attribute layout.

Member Function Documentation

◆ 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
nameSpecifies the attribute name.
indexSpecifies the index of the generic vertex attribute to be modified.
formatSpecifies how the vertex attribute data is laid out in memory.
offsetSpecifies the byte offset to the first component of the first generic vertex attribute.
needToBeNormallizedSpecifies 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
strideSpecifies 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: