#pragma once #include #include #include #include #include "gfx/vertex_array.hpp" #include "gfx/texture.hpp" namespace assets { struct MeshVertex { glm::vec3 pos; glm::vec3 normal; glm::vec2 uv; glm::vec2 lightmap_uv; }; struct MeshTriangle { uint32_t vert[3]; }; struct MeshMaterialSlot { std::string name; std::shared_ptr texture; size_t first_tri = 0; size_t num_tris = 0; }; class Mesh { gfx::VertexArray va_; std::vector materials_; public: Mesh(std::span verts, std::span tris, std::span materials); static std::shared_ptr LoadFromFile(const std::string& filename); }; }