From 75f3941579c756655fc7d4d29e7b92b6eae436b7 Mon Sep 17 00:00:00 2001 From: Mel Date: Mon, 3 Oct 2022 07:21:44 +0200 Subject: Indexed Rendering --- src/Mesh.hpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/Mesh.hpp') diff --git a/src/Mesh.hpp b/src/Mesh.hpp index a6d80d3..a9dadb7 100644 --- a/src/Mesh.hpp +++ b/src/Mesh.hpp @@ -9,12 +9,19 @@ namespace MC { class Mesh { public: - Mesh(std::vector> positions) : m_positions(std::move(positions)) {}; + Mesh(std::vector> positions, std::vector indices) + : m_positions(std::move(positions)), m_indices(std::move(indices)) {}; + + float* raw(); + size_t size(); + + uint32_t* raw_indices(); + size_t indices_size(); - std::size_t size(); - float* flat(); private: std::vector> m_positions; + std::vector m_indices; + }; } \ No newline at end of file -- cgit 1.4.1