diff options
| author | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-11 01:36:17 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2026-03-11 01:36:17 +0000 |
| commit | c6cff2f1e823327129ed7d044cec6c05fa7525a1 (patch) | |
| tree | 87025e984f4d7fba2338bb585190b2107cc8573b /gfx/gl | |
| parent | Replace hacky m4 shader preprocessing with proper glslang version (diff) | |
| download | ilt-c6cff2f1e823327129ed7d044cec6c05fa7525a1.tar.bz2 ilt-c6cff2f1e823327129ed7d044cec6c05fa7525a1.tar.xz ilt-c6cff2f1e823327129ed7d044cec6c05fa7525a1.zip | |
Split addAttribsFor away from requiring a buffer to bind
Diffstat (limited to 'gfx/gl')
| -rw-r--r-- | gfx/gl/glVertexArray.h | 10 |
1 files changed, 9 insertions, 1 deletions
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<typename VertexT> VertexArrayConfigurator & addAttribsFor(GLuint divisor, const glBuffer & buffer); + template<typename VertexT> VertexArrayConfigurator & addAttribsFor(GLuint divisor); + + template<typename VertexT> + VertexArrayConfigurator & + addAttribsFor(GLuint divisor, const glBuffer & buffer) + { + glVertexArrayVertexBuffer(name, binding, buffer, 0, sizeof(VertexT)); + return addAttribsFor<VertexT>(divisor); + } template<typename VertexT, MP... Attribs> VertexArrayConfigurator & |
