diff options
| author | Mel <einebeere@gmail.com> | 2022-10-03 07:21:44 +0200 |
|---|---|---|
| committer | Mel <einebeere@gmail.com> | 2022-10-03 07:21:44 +0200 |
| commit | 75f3941579c756655fc7d4d29e7b92b6eae436b7 (patch) | |
| tree | f8fab6809cd9525d060cfa62269f00d7ff3ea793 /src/Mesh.hpp | |
| parent | 3b289a2f75b6e96735519a65d93b6babd1b1759f (diff) | |
| download | meowcraft-75f3941579c756655fc7d4d29e7b92b6eae436b7.tar.zst meowcraft-75f3941579c756655fc7d4d29e7b92b6eae436b7.zip | |
Indexed Rendering
Diffstat (limited to 'src/Mesh.hpp')
| -rw-r--r-- | src/Mesh.hpp | 13 |
1 files changed, 10 insertions, 3 deletions
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<Vector<3>> positions) : m_positions(std::move(positions)) {}; + Mesh(std::vector<Vector<3>> positions, std::vector<uint32_t> 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<Vector<3>> m_positions; + std::vector<uint32_t> m_indices; + }; } \ No newline at end of file |
