From ef00fc9ae1323b64d5e167d04a987887c60c6ec0 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 10 May 2023 00:02:50 +0100 Subject: Make Mesh into a template to support any vertex type Customisation point VertexArrayObject to define the layout for the type --- gfx/models/vertex.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 gfx/models/vertex.cpp (limited to 'gfx/models/vertex.cpp') diff --git a/gfx/models/vertex.cpp b/gfx/models/vertex.cpp new file mode 100644 index 0000000..c144db3 --- /dev/null +++ b/gfx/models/vertex.cpp @@ -0,0 +1,10 @@ +#include "vertex.h" +#include "gfx/gl/vertexArrayObject.h" + +template<> +VertexArrayObject & +VertexArrayObject::addAttribsFor(const GLuint arrayBuffer, const GLuint divisor) +{ + return addAttribs( + arrayBuffer, divisor); +} -- cgit v1.2.3