From cf0ecc35ed114c6bf54fce9c6228d60dbba1a3b5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Fri, 6 Mar 2026 14:22:28 +0000 Subject: Replace use of VertexArrayObject with glVertexArray/glBuffer DSA versions --- gfx/models/mesh.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'gfx/models/mesh.h') diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h index 4135a30..e78d27e 100644 --- a/gfx/models/mesh.h +++ b/gfx/models/mesh.h @@ -2,7 +2,6 @@ #include "config/types.h" #include "gfx/gl/glBuffer.h" -#include "gfx/gl/vertexArrayObject.h" #include #include #include @@ -54,15 +53,15 @@ public: return static_cast(v.pos); }))} { - VertexArrayObject::data(vertices, m_vertexArrayBuffers[0], GL_ARRAY_BUFFER); - VertexArrayObject::data(indices, m_vertexArrayBuffers[1], GL_ARRAY_BUFFER); - configureVAO(m_vertexArrayObject); + m_vertexArrayBuffers[0].storage(vertices, 0); + m_vertexArrayBuffers[1].storage(indices, 0); + configureVAO(m_vertexArrayObject, 0); } - VertexArrayObject & - configureVAO(VertexArrayObject && vao) const + auto + configureVAO(glVertexArray & vao, GLuint divisor) const { - return vao.addAttribsFor(m_vertexArrayBuffers[0]).addIndices(m_vertexArrayBuffers[1]); + return vao.configure().addAttribsFor(divisor, m_vertexArrayBuffers[0]).addIndices(m_vertexArrayBuffers[1]); } }; -- cgit v1.3