|
Muto 0.0.1
|
Represents the layout of a buffer, consisting of multiple BufferElements. More...
#include <Buffer.h>
Public Member Functions | |
| std::vector< BufferElement >::iterator | begin () |
| std::vector< BufferElement >::const_iterator | begin () const |
| BufferLayout () | |
| BufferLayout (const std::initializer_list< BufferElement > &elements) | |
| Constructs a BufferLayout with the given list of BufferElements. | |
| std::vector< BufferElement >::iterator | end () |
| std::vector< BufferElement >::const_iterator | end () const |
| const std::vector< BufferElement > & | GetElements () const |
| Returns the list of BufferElements in the layout. | |
| uint32_t | GetStride () const |
| Returns the stride (total size in bytes) of the buffer layout. | |
Private Member Functions | |
| void | CalculateOffsetsAndStride () |
| Calculates the offsets and stride for the buffer layout based on its elements. | |
Private Attributes | |
| std::vector< BufferElement > | m_Elements |
| uint32_t | m_Stride = 0 |
Represents the layout of a buffer, consisting of multiple BufferElements.
|
inline |
|
inline |
Constructs a BufferLayout with the given list of BufferElements.
| elements | The list of BufferElements that make up the layout. Automatically calculates offsets and stride. |
References BufferLayout(), CalculateOffsetsAndStride(), and m_Stride.
Referenced by BufferLayout().
|
inline |
|
inline |
|
inlineprivate |
Calculates the offsets and stride for the buffer layout based on its elements.
References m_Stride.
Referenced by BufferLayout().
|
inline |
|
inline |
|
inline |
Returns the list of BufferElements in the layout.
|
inline |
|
private |
|
private |
Referenced by BufferLayout(), CalculateOffsetsAndStride(), and GetStride().