From c6cff2f1e823327129ed7d044cec6c05fa7525a1 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 11 Mar 2026 01:36:17 +0000 Subject: Split addAttribsFor away from requiring a buffer to bind --- gfx/gl/glVertexArray.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'gfx/gl/glVertexArray.h') diff --git a/gfx/gl/glVertexArray.h b/gfx/gl/glVertexArray.h index dbe930f..6630b70 100644 --- a/gfx/gl/glVertexArray.h +++ b/gfx/gl/glVertexArray.h @@ -40,7 +40,15 @@ namespace Impl { } // Customisation point - template VertexArrayConfigurator & addAttribsFor(GLuint divisor, const glBuffer & buffer); + template VertexArrayConfigurator & addAttribsFor(GLuint divisor); + + template + VertexArrayConfigurator & + addAttribsFor(GLuint divisor, const glBuffer & buffer) + { + glVertexArrayVertexBuffer(name, binding, buffer, 0, sizeof(VertexT)); + return addAttribsFor(divisor); + } template VertexArrayConfigurator & -- cgit v1.3