From 4b560f03201f1c2d7c632126cd1e512ed4027072 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 26 Apr 2023 01:16:06 +0100 Subject: Add Mesh helper for drawing instances Assumes the supplied VAO was created and configured for the mesh it's passed back to. --- gfx/models/mesh.h | 1 + 1 file changed, 1 insertion(+) (limited to 'gfx/models/mesh.h') diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index 472b7ed..a2205a1 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -14,6 +14,7 @@ public: Mesh(const std::span vertices, const std::span indices, GLenum = GL_TRIANGLES); void Draw() const; + void DrawInstanced(GLuint vao, GLsizei count) const; VertexArrayObject & configureVAO(VertexArrayObject &&) const; GLsizei count() const; GLenum type() const; -- cgit v1.2.3 From c3af3f3ec6aff3e366acb8825413096581c736c1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 26 Apr 2023 02:04:17 +0100 Subject: Revert "Export mesh size and primitive type" This reverts commit f3343e1cc8a56f039888d4d375a6d5a088a68494. --- gfx/models/mesh.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'gfx/models/mesh.h') diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index a2205a1..538c57a 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -16,8 +16,6 @@ public: void Draw() const; void DrawInstanced(GLuint vao, GLsizei count) const; VertexArrayObject & configureVAO(VertexArrayObject &&) const; - GLsizei count() const; - GLenum type() const; private: glVertexArray m_vertexArrayObject; -- cgit v1.2.3