30#include "graphics/VertexLayout.h"
51 Mesh(
const VertexLayout &layout,
const std::vector<float> &vertices,
const std::vector<uint32_t> &indices);
77 static std::shared_ptr<Mesh>
CreateSphere(
f32 radius,
int sectors,
int stacks);
78 static std::shared_ptr<Mesh>
CreateCapsule(
f32 radius,
f32 height,
int sectors,
int hemisphereStacks);
80 static std::shared_ptr<Mesh>
CreateBox(
const glm::vec3 &extents = glm::vec3(1.0f));
88 size_t m_vertexCount = 0;
89 size_t m_indexCount = 0;
Engine-wide primitive type aliases and GLM math imports.
Immutable GPU mesh (VAO + VBO + optional EBO).
static std::shared_ptr< Mesh > CreateSphere(f32 radius, int sectors, int stacks)
void Draw()
Issue the draw call for this mesh.
static std::shared_ptr< Mesh > CreateCapsule(f32 radius, f32 height, int sectors, int hemisphereStacks)
Mesh(const Mesh &)=delete
static std::shared_ptr< Mesh > CreateCube()
Creates a unit cube mesh (factory convenience, same as Builder::CreateCube).
Mesh & operator=(const Mesh &)=delete
void Bind()
Bind the VAO so subsequent draw calls use this mesh's geometry.
static std::shared_ptr< Mesh > CreateBox(const glm::vec3 &extents=glm::vec3(1.0f))
float f32
32-bit IEEE float — the standard GL scalar type.
Complete description of how vertex data is packed in a VBO.