From a6052168340f9831c766f76a3ec7b94da38da78a Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 4 Mar 2026 16:53:58 +0000 Subject: Replace basic glVertexArray with a specific class ready for helpers --- game/network/network.h | 1 + gfx/gl/glVertexArray.h | 15 +++++++++++++++ gfx/models/mesh.h | 2 +- lib/glArrays.h | 2 -- 4 files changed, 17 insertions(+), 3 deletions(-) create mode 100644 gfx/gl/glVertexArray.h diff --git a/game/network/network.h b/game/network/network.h index 4f5d2b0..46b84d4 100644 --- a/game/network/network.h +++ b/game/network/network.h @@ -1,6 +1,7 @@ #pragma once #include "collection.h" +#include "gfx/gl/glVertexArray.h" #include "gfx/gl/instanceVertices.h" #include "gfx/models/texture.h" #include "gfx/renderable.h" 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 +using glVertexArrays = glManagedArray; +using glVertexArray = glManagedSingle; +// 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 +#include #include #include #include diff --git a/lib/glArrays.h b/lib/glArrays.h index 48bd577..e949ccd 100644 --- a/lib/glArrays.h +++ b/lib/glArrays.h @@ -119,8 +119,6 @@ struct glManagedArray : public std::array { }; // NOLINTBEGIN(readability-identifier-naming) -template using glVertexArrays = glManagedArray; -using glVertexArray = glManagedSingle; template using glBuffers = glManagedArray; using glBuffer = glManagedSingle; template using glFrameBuffers = glManagedArray; -- cgit v1.3