summaryrefslogtreecommitdiff
path: root/gfx/models/mesh.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/models/mesh.cpp')
-rw-r--r--gfx/models/mesh.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/gfx/models/mesh.cpp b/gfx/models/mesh.cpp
index 55759cb..3faf252 100644
--- a/gfx/models/mesh.cpp
+++ b/gfx/models/mesh.cpp
@@ -42,3 +42,13 @@ Mesh::Draw() const
glBindVertexArray(0);
}
+
+void
+Mesh::DrawInstanced(GLuint vao, GLsizei count) const
+{
+ glBindVertexArray(vao);
+
+ glDrawElementsInstanced(mode, m_numIndices, GL_UNSIGNED_INT, nullptr, count);
+
+ glBindVertexArray(0);
+}