From e3d42befda7ee1f309d1a67797db492561fd8e52 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 28 Jun 2024 20:23:57 +0100 Subject: Allow passing start index for instanced draw First stage of culling support --- gfx/models/mesh.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gfx/models/mesh.cpp') diff --git a/gfx/models/mesh.cpp b/gfx/models/mesh.cpp index 374b731..e7474ca 100644 --- a/gfx/models/mesh.cpp +++ b/gfx/models/mesh.cpp @@ -13,11 +13,11 @@ MeshBase::Draw() const } void -MeshBase::DrawInstanced(GLuint vao, GLsizei count) const +MeshBase::DrawInstanced(GLuint vao, GLsizei count, GLuint base) const { glBindVertexArray(vao); - glDrawElementsInstanced(mode, m_numIndices, GL_UNSIGNED_INT, nullptr, count); + glDrawElementsInstancedBaseInstance(mode, m_numIndices, GL_UNSIGNED_INT, nullptr, count, base); glBindVertexArray(0); } -- cgit v1.2.3