summaryrefslogtreecommitdiff
path: root/gfx
diff options
context:
space:
mode:
authorDan Goodliffe <dan.goodliffe@octal.co.uk>2026-03-04 16:53:58 +0000
committerDan Goodliffe <dan.goodliffe@octal.co.uk>2026-03-04 16:53:58 +0000
commita6052168340f9831c766f76a3ec7b94da38da78a (patch)
treef508f7701a8d7ac0b1c1bfd674bd3c01ad65fcd2 /gfx
parentUpdate stencils and billboards less often (diff)
downloadilt-a6052168340f9831c766f76a3ec7b94da38da78a.tar.bz2
ilt-a6052168340f9831c766f76a3ec7b94da38da78a.tar.xz
ilt-a6052168340f9831c766f76a3ec7b94da38da78a.zip
Replace basic glVertexArray with a specific class ready for helpers
Diffstat (limited to 'gfx')
-rw-r--r--gfx/gl/glVertexArray.h15
-rw-r--r--gfx/models/mesh.h2
2 files changed, 16 insertions, 1 deletions
diff --git a/gfx/gl/glVertexArray.h b/gfx/gl/glVertexArray.h
new file mode 100644
index 0000000..891f21d
--- /dev/null
+++ b/gfx/gl/glVertexArray.h
@@ -0,0 +1,15 @@
+#pragma once
+
+#include "config/types.h"
+#include "glArrays.h"
+
+namespace Impl {
+ // NOLINTNEXTLINE(readability-identifier-naming)
+ struct glVertexArray : Detail::glNamed { };
+}
+
+// NOLINTBEGIN(readability-identifier-naming)
+template<size_t N>
+using glVertexArrays = glManagedArray<Impl::glVertexArray, N, &glCreateVertexArrays, &glDeleteVertexArrays>;
+using glVertexArray = glManagedSingle<Impl::glVertexArray, &glCreateVertexArrays, &glDeleteVertexArrays>;
+// NOLINTEND(readability-identifier-naming)
diff --git a/gfx/models/mesh.h b/gfx/models/mesh.h
index 8791aed..d6ac171 100644
--- a/gfx/models/mesh.h
+++ b/gfx/models/mesh.h
@@ -2,7 +2,7 @@
#include "config/types.h"
#include "gfx/gl/vertexArrayObject.h"
-#include <glArrays.h>
+#include <gfx/gl/glVertexArray.h>
#include <glad/gl.h>
#include <ranges>
#include <span>