diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-01-31 13:54:54 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-02-04 19:29:49 +0000 |
commit | eb9369ff236d4be52fe5c1e4d2331007b54f7177 (patch) | |
tree | f0750889075b8f46f592a4e74fe5d02fe4324b6a /gfx/models/mesh.h | |
parent | Collection can be shared/unique pointers (diff) | |
download | ilt-eb9369ff236d4be52fe5c1e4d2331007b54f7177.tar.bz2 ilt-eb9369ff236d4be52fe5c1e4d2331007b54f7177.tar.xz ilt-eb9369ff236d4be52fe5c1e4d2331007b54f7177.zip |
Create mesh direct from vertices and indices
Diffstat (limited to 'gfx/models/mesh.h')
-rw-r--r-- | gfx/models/mesh.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index 6dc5c32..e955644 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -4,6 +4,7 @@ #include <GL/glew.h>
#include <array>
#include <cstddef>
+#include <span>
#include <special_members.hpp>
#include <string>
@@ -16,7 +17,7 @@ class Mesh { public:
explicit Mesh(const std::string & fileName);
explicit Mesh(const IndexedModel & model);
- Mesh(Vertex * vertices, unsigned int numVertices, unsigned int * indices, unsigned int numIndices);
+ Mesh(std::span<Vertex> vertices, std::span<unsigned int> indices);
virtual ~Mesh();
NO_COPY(Mesh);
|