|
CeresEngine 0.2.0
A game development framework
|
Contains the definition of a single vertex buffer layout. More...
#include <CeresEngine/Mesh/VertexLayout.hpp>
Public Member Functions | |
| void | addElement (VertexElement element, const size_t offset, size_t stride=~0ul) |
| Adds a new element to the vertex layout. | |
Static Public Member Functions | |
| static VertexLayout | interleaved (const VertexDeclaration &declaration) |
Computes a layout in which every vertex element in declaration is interleaved, that is, for every vertex all it's elements are packed one after the other. | |
| static VertexLayout | separated (const VertexDeclaration &declaration, const std::size_t vertexCount) |
Computes a layout in which every vertex element in declaration is separated, that is, first all values of the first element are placed, then all values of the second element and so on until the end of all elements. | |
Public Attributes | |
| Vector< VertexLayoutElement > | layoutElements |
Contains the definition of a single vertex buffer layout.
|
inline |
Adds a new element to the vertex layout.
| element | The vertex element that describes the format and semantic of the element. |
| offset | The offset, from the begging of the buffer, where data from this element starts. |
| stride | The stride to the next vertex of the same element. |
|
inlinestatic |
Computes a layout in which every vertex element in declaration is interleaved, that is, for every vertex all it's elements are packed one after the other.
| declaration | The vertex declaration to create the layout from. |
|
inlinestatic |
Computes a layout in which every vertex element in declaration is separated, that is, first all values of the first element are placed, then all values of the second element and so on until the end of all elements.
| declaration | The vertex declaration to create the layout from. |
| vertexCount | The number of vertices present in the buffer. |
| Vector<VertexLayoutElement> CeresEngine::VertexLayout::layoutElements |