diff options
Diffstat (limited to 'gfx/models/mesh.cpp')
-rw-r--r-- | gfx/models/mesh.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/gfx/models/mesh.cpp b/gfx/models/mesh.cpp index 1f4dc09..e7474ca 100644 --- a/gfx/models/mesh.cpp +++ b/gfx/models/mesh.cpp @@ -1,7 +1,4 @@ #include "mesh.h" -#include "glArrays.h" -#include "vertex.h" -#include <cstddef> MeshBase::MeshBase(GLsizei m_numIndices, GLenum mode) : m_numIndices {m_numIndices}, mode {mode} { } @@ -16,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); } |