![]() |
Raven Engine v0.1
|
Represents the layout of vertex buffer elements in memory. More...
#include <Buffer.h>
Public Member Functions | |
| VertexBufferLayout ()=default | |
| constexpr | VertexBufferLayout (const std::initializer_list< BufferElement > &elements) |
| Constructs a layout from a list of buffer elements. | |
| constexpr u32 | GetStride () const |
| Returns the stride (total size in bytes) of one vertex. | |
| constexpr const std::vector< BufferElement > & | GetElements () const |
| Returns the vector of BufferElements. | |
| constexpr std::vector< BufferElement >::iterator | begin () |
| constexpr std::vector< BufferElement >::iterator | end () |
| constexpr std::vector< BufferElement >::const_iterator | begin () const |
| constexpr std::vector< BufferElement >::const_iterator | end () const |
Represents the layout of vertex buffer elements in memory.
Manages a vector of BufferElement describing each attribute, and calculates the byte offsets and total stride (size of one vertex).
Provides iterators for range-based loops.
Usage:
|
default |
|
inlineconstexpr |
Constructs a layout from a list of buffer elements.
Automatically calculates offsets and stride.
| elements | Initial list of BufferElements. |
|
inlineconstexpr |
|
inlinenodiscardconstexpr |
|
inlineconstexpr |
|
inlinenodiscardconstexpr |
|
inlinenodiscardconstexpr |
Returns the vector of BufferElements.
|
inlinenodiscardconstexpr |
Returns the stride (total size in bytes) of one vertex.