From 64ede41ebaade64ad6705f7f55ca4a778a156481 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 2 Mar 2026 13:17:28 +0000 Subject: Wrap up some low level texture operations in glTexture class Fixes previously hard coded billboard texture size. --- gfx/gl/glTexture.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 gfx/gl/glTexture.h (limited to 'gfx/gl/glTexture.h') diff --git a/gfx/gl/glTexture.h b/gfx/gl/glTexture.h new file mode 100644 index 0000000..c482198 --- /dev/null +++ b/gfx/gl/glTexture.h @@ -0,0 +1,17 @@ +#pragma once + +#include "config/types.h" +#include "glArrays.h" + +namespace Impl { + // NOLINTNEXTLINE(readability-identifier-naming) + struct glTexture : Detail::glNamed { + [[nodiscard]] TextureDimensions getSize() const; + void bind(GLenum type = GL_TEXTURE_2D, GLenum unit = GL_TEXTURE0) const; + }; +} + +// NOLINTBEGIN(readability-identifier-naming) +template using glTextures = glManagedArray; +using glTexture = glManagedSingle; +// NOLINTEND(readability-identifier-naming) -- cgit v1.3