summaryrefslogtreecommitdiff
path: root/gfx/gl/glVertexArray.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2026-03-11 01:36:17 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2026-03-11 01:36:17 +0000
commitc6cff2f1e823327129ed7d044cec6c05fa7525a1 (patch)
tree87025e984f4d7fba2338bb585190b2107cc8573b /gfx/gl/glVertexArray.h
parentReplace hacky m4 shader preprocessing with proper glslang version (diff)
downloadilt-c6cff2f1e823327129ed7d044cec6c05fa7525a1.tar.bz2
ilt-c6cff2f1e823327129ed7d044cec6c05fa7525a1.tar.xz
ilt-c6cff2f1e823327129ed7d044cec6c05fa7525a1.zip
Split addAttribsFor away from requiring a buffer to bind
Diffstat (limited to 'gfx/gl/glVertexArray.h')
-rw-r--r--gfx/gl/glVertexArray.h10
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 &