Class VertexBufferLayout#

Class Documentation#

class VertexBufferLayout#

Describes a vertex buffer layout.

Public Functions

constexpr VertexBufferLayout() noexcept = default#

Constructor.

constexpr VertexBufferLayout(const std::initializer_list<VertexBufferElement> &elements) noexcept#

Constructor. Initialize the vertex buffer layout with the given elements.

Parameters:

elements – Vertex buffer elements.

constexpr VertexBufferLayout(const VertexBufferLayout&) = default#

Copy constructor.

constexpr VertexBufferLayout &operator=(const VertexBufferLayout&) = default#

Copy assignment operator.

constexpr VertexBufferLayout(VertexBufferLayout&&) noexcept = default#

Move constructor.

constexpr VertexBufferLayout &operator=(VertexBufferLayout&&) noexcept = default#

Move assignment operator.

constexpr ~VertexBufferLayout() = default#

Destructor.

constexpr u32 GetStride() const noexcept#

Retrieve the total byte size of all vertex buffer elements used in this layout.

constexpr const std::vector<VertexBufferElement> &GetElements() const noexcept#

Retrieve the vertex buffer elements described by this layout.

Returns:

Vertex buffer elements.

constexpr std::vector<VertexBufferElement>::iterator begin() noexcept#

Returns an iterator to the first element of the vertexbuffer layout.

Returns:

Iterator to the first element.

constexpr std::vector<VertexBufferElement>::const_iterator begin() const noexcept#

Returns an iterator to the first element of the vertexbuffer layout.

Returns:

Iterator to the first element.

constexpr std::vector<VertexBufferElement>::const_iterator cbegin() const noexcept#

Returns an iterator to the first element of the vertexbuffer layout.

Returns:

Iterator to the first element.

constexpr std::vector<VertexBufferElement>::iterator end() noexcept#

Returns an iterator to the element following the last element of the vertex buffer layout.

Note

This element acts as a placeholder; attempting to access it results in undefined behaviour.

Returns:

Iterator to the element following the last element.

constexpr std::vector<VertexBufferElement>::const_iterator end() const noexcept#

Returns an iterator to the element following the last element of the vertex buffer layout.

Note

This element acts as a placeholder; attempting to access it results in undefined behaviour.

Returns:

Iterator to the element following the last element.

constexpr std::vector<VertexBufferElement>::const_iterator cend() const noexcept#

Returns an iterator to the element following the last element of the vertex buffer layout.

Note

This element acts as a placeholder; attempting to access it results in undefined behaviour.

Returns:

Iterator to the element following the last element.