diff options
| author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-02 13:17:28 +0000 |
|---|---|---|
| committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2026-03-02 13:17:28 +0000 |
| commit | 64ede41ebaade64ad6705f7f55ca4a778a156481 (patch) | |
| tree | 6d2fbc64cd28d272fe3f5bbf79ddd41ecc5e2626 /gfx/gl/glTexture.h | |
| parent | Refactor glArrays to better expose underlying types (diff) | |
| download | ilt-64ede41ebaade64ad6705f7f55ca4a778a156481.tar.bz2 ilt-64ede41ebaade64ad6705f7f55ca4a778a156481.tar.xz ilt-64ede41ebaade64ad6705f7f55ca4a778a156481.zip | |
Fixes previously hard coded billboard texture size.
Diffstat (limited to 'gfx/gl/glTexture.h')
| -rw-r--r-- | gfx/gl/glTexture.h | 17 |
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) |
