Struct VertexBufferElement#

Struct Documentation#

struct VertexBufferElement#

Struct used to describe a single vertex attribute.

Public Functions

constexpr VertexBufferElement(ShaderDataType type, std::string name, bool normalized = false) noexcept#

Constructor. Initialize the vertex buffer element with the given data.

Parameters:
  • typeShader data type.

  • name – Name of the vertex attribute.

  • normalized – Whether data is normalized.

constexpr VertexBufferElement(const VertexBufferElement&) = default#

Copy constructor.

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

Copy assignment operator.

constexpr VertexBufferElement(VertexBufferElement&&) noexcept = default#

Move constructor.

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

Move assignment operator.

constexpr ~VertexBufferElement() = default#

Destructor.

constexpr u32 GetComponentCount() const#

Retrieve the component count of this vertex attribute.

Returns:

Component count of this vertex attribute.

Public Members

std::string Name#
ShaderDataType Type#
u32 Size = {}#
u32 Offset = {}#
bool Normalized = {}#