summaryrefslogtreecommitdiff
path: root/gfx/gl/glTexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/glTexture.h')
-rw-r--r--gfx/gl/glTexture.h17
1 files changed, 17 insertions, 0 deletions
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<size_t N> using glTextures = glManagedArray<Impl::glTexture, N, &glGenTextures, &glDeleteTextures>;
+using glTexture = glManagedSingle<Impl::glTexture, &glGenTextures, &glDeleteTextures>;
+// NOLINTEND(readability-identifier-naming)