Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
esengine::VertexAttribute Struct Reference

Describes a single vertex attribute. More...

#include <Buffer.hpp>

Public Member Functions

 VertexAttribute ()=default
 Default constructor.
 VertexAttribute (ShaderDataType type, const std::string &name, bool normalized=false)
 Constructs a vertex attribute.

Public Attributes

std::string name
 Attribute name (for debugging).
ShaderDataType type
 Data type of the attribute.
u32 size
 Size in bytes.
u32 offset
 Byte offset within the vertex.
bool normalized
 Whether to normalize integer data to [0,1] or [-1,1].

Detailed Description

Describes a single vertex attribute.

Contains all information needed to configure a vertex attribute pointer in OpenGL/WebGL.

Definition at line 83 of file Buffer.hpp.

Constructor & Destructor Documentation

◆ VertexAttribute() [1/2]

esengine::VertexAttribute::VertexAttribute ( )
default

Default constructor.

◆ VertexAttribute() [2/2]

esengine::VertexAttribute::VertexAttribute ( ShaderDataType type,
const std::string & name,
bool normalized = false )
inline

Constructs a vertex attribute.

Parameters
typeData type
nameAttribute name
normalizedWhether to normalize integer data

Definition at line 104 of file Buffer.hpp.

References name, normalized, offset, esengine::shaderDataTypeSize(), size, and type.

Member Data Documentation

◆ name

std::string esengine::VertexAttribute::name

Attribute name (for debugging).

Definition at line 85 of file Buffer.hpp.

Referenced by VertexAttribute().

◆ normalized

bool esengine::VertexAttribute::normalized

Whether to normalize integer data to [0,1] or [-1,1].

Definition at line 93 of file Buffer.hpp.

Referenced by VertexAttribute().

◆ offset

u32 esengine::VertexAttribute::offset

Byte offset within the vertex.

Definition at line 91 of file Buffer.hpp.

Referenced by VertexAttribute().

◆ size

u32 esengine::VertexAttribute::size

Size in bytes.

Definition at line 89 of file Buffer.hpp.

Referenced by VertexAttribute().

◆ type

ShaderDataType esengine::VertexAttribute::type

Data type of the attribute.

Definition at line 87 of file Buffer.hpp.

Referenced by VertexAttribute().


The documentation for this struct was generated from the following file:
  • /home/runner/work/estella/estella/src/esengine/renderer/rhi/Buffer.hpp