|
Muto 0.0.1
|
Represents a single element in a buffer layout. More...
#include <Buffer.h>
Public Member Functions | |
| BufferElement () | |
| BufferElement (ShaderDataType type, const std::string &name, bool normalized=false) | |
| Constructs a BufferElement with the given type, name, and normalization flag. | |
| uint32_t | GetComponentCount () const |
| Returns the number of components in the buffer element based on its ShaderDataType. | |
Public Attributes | |
| std::string | Name |
| The name of the buffer element. | |
| bool | Normalized |
| Whether the buffer element is normalized. | |
| uint32_t | Offset |
| The offset in bytes of the buffer element from the start of the buffer. | |
| uint32_t | Size |
| The size in bytes of the buffer element. | |
| ShaderDataType | Type |
| The data type of the buffer element. | |
Represents a single element in a buffer layout.
|
inline |
|
inline |
Constructs a BufferElement with the given type, name, and normalization flag.
| type | The ShaderDataType of the buffer element. |
| name | The name of the buffer element. |
| normalized | Whether the buffer element is normalized. |
References Name, Normalized, Offset, Muto::ShaderDataTypeSize(), Size, and Type.
|
inline |
Returns the number of components in the buffer element based on its ShaderDataType.
References Muto::SDT_Bool, Muto::SDT_Float, Muto::SDT_Float2, Muto::SDT_Float3, Muto::SDT_Float4, Muto::SDT_Int, Muto::SDT_Int2, Muto::SDT_Int3, Muto::SDT_Int4, Muto::SDT_Mat3, Muto::SDT_Mat4, and Type.
| std::string Muto::BufferElement::Name |
The name of the buffer element.
Referenced by BufferElement().
| bool Muto::BufferElement::Normalized |
Whether the buffer element is normalized.
Referenced by BufferElement().
| uint32_t Muto::BufferElement::Offset |
The offset in bytes of the buffer element from the start of the buffer.
Referenced by BufferElement().
| uint32_t Muto::BufferElement::Size |
The size in bytes of the buffer element.
Referenced by BufferElement().
| ShaderDataType Muto::BufferElement::Type |
The data type of the buffer element.
Referenced by BufferElement(), and GetComponentCount().