diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-10 00:02:50 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-05-10 00:02:50 +0100 |
commit | ef00fc9ae1323b64d5e167d04a987887c60c6ec0 (patch) | |
tree | a214a04fca7969d5c892422cc462e0bf31e80ee9 /gfx/gl | |
parent | Support for tessellation shaders (diff) | |
download | ilt-ef00fc9ae1323b64d5e167d04a987887c60c6ec0.tar.bz2 ilt-ef00fc9ae1323b64d5e167d04a987887c60c6ec0.tar.xz ilt-ef00fc9ae1323b64d5e167d04a987887c60c6ec0.zip |
Make Mesh into a template to support any vertex type
Customisation point VertexArrayObject to define the layout for the type
Diffstat (limited to 'gfx/gl')
-rw-r--r-- | gfx/gl/vertexArrayObject.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx/gl/vertexArrayObject.h b/gfx/gl/vertexArrayObject.h index 085cba6..1d27588 100644 --- a/gfx/gl/vertexArrayObject.h +++ b/gfx/gl/vertexArrayObject.h @@ -46,6 +46,9 @@ public: return *this; } + // Customisation point + template<typename VertexT> VertexArrayObject & addAttribsFor(const GLuint arrayBuffer, const GLuint divisor = 0); + template<typename Indices> VertexArrayObject & addIndices(const GLuint arrayBuffer, const Indices & indices) |