From 9b0828ea5bb6cb4e92d6019785b3ceb88e2a58be Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 17 Apr 2023 22:43:51 +0100 Subject: Separate storing of mesh vertex/index data from configuring VAO --- gfx/models/mesh.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gfx/models/mesh.h') diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index 25a9064..0af8d70 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -7,12 +7,14 @@ #include class Vertex; +class VertexArrayObject; class Mesh : public ConstTypeDefs { public: Mesh(const std::span vertices, const std::span indices, GLenum = GL_TRIANGLES); void Draw() const; + VertexArrayObject & configureVAO(VertexArrayObject &&) const; private: glVertexArray m_vertexArrayObject; -- cgit v1.2.3 From f3343e1cc8a56f039888d4d375a6d5a088a68494 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 19 Apr 2023 01:52:46 +0100 Subject: Export mesh size and primitive type --- gfx/models/mesh.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gfx/models/mesh.h') diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index 0af8d70..472b7ed 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -15,6 +15,8 @@ public: void Draw() const; VertexArrayObject & configureVAO(VertexArrayObject &&) const; + GLsizei count() const; + GLenum type() const; private: glVertexArray m_vertexArrayObject; -- cgit v1.2.3