summaryrefslogtreecommitdiff
path: root/gfx/models/mesh.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-03-07 12:56:33 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-03-07 14:17:44 +0000
commitb39a4169e3fe94f3b7c63ed820f299396add571a (patch)
treedb2a4252d256e7ce26f68dce8cdda6bf4fd80446 /gfx/models/mesh.cpp
parentAdd glVertexArray useBuffer (diff)
downloadilt-b39a4169e3fe94f3b7c63ed820f299396add571a.tar.bz2
ilt-b39a4169e3fe94f3b7c63ed820f299396add571a.tar.xz
ilt-b39a4169e3fe94f3b7c63ed820f299396add571a.zip
Fix naming violations in Mesh
They've existed and been annoying since the day I first created it from online examples.
Diffstat (limited to 'gfx/models/mesh.cpp')
-rw-r--r--gfx/models/mesh.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/gfx/models/mesh.cpp b/gfx/models/mesh.cpp
index 2eae160..88314ae 100644
--- a/gfx/models/mesh.cpp
+++ b/gfx/models/mesh.cpp
@@ -1,7 +1,7 @@
#include "mesh.h"
MeshBase::MeshBase(GLsizei m_numIndices, GLenum mode, const std::vector<RelativePosition3D> & positions) :
- m_numIndices {m_numIndices}, mode {mode}, dimensions {positions}
+ numIndices {m_numIndices}, mode {mode}, dimensions {positions}
{
}
@@ -29,21 +29,21 @@ MeshBase::Dimensions::extents(const std::span<const RelativePosition3D> position
}
void
-MeshBase::Draw() const
+MeshBase::draw() const
{
- glBindVertexArray(m_vertexArrayObject);
+ glBindVertexArray(vertexArrayObject);
- glDrawElements(mode, m_numIndices, GL_UNSIGNED_INT, nullptr);
+ glDrawElements(mode, numIndices, GL_UNSIGNED_INT, nullptr);
glBindVertexArray(0);
}
void
-MeshBase::DrawInstanced(GLuint vao, GLsizei count, GLuint base) const
+MeshBase::drawInstanced(GLuint vao, GLsizei count, GLuint base) const
{
glBindVertexArray(vao);
- glDrawElementsInstancedBaseInstance(mode, m_numIndices, GL_UNSIGNED_INT, nullptr, count, base);
+ glDrawElementsInstancedBaseInstance(mode, numIndices, GL_UNSIGNED_INT, nullptr, count, base);
glBindVertexArray(0);
}