summaryrefslogtreecommitdiff
path: root/gfx/models/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/models/texture.h')
-rw-r--r--gfx/models/texture.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/gfx/models/texture.h b/gfx/models/texture.h
index 1aad1e0..31ffaa5 100644
--- a/gfx/models/texture.h
+++ b/gfx/models/texture.h
@@ -8,11 +8,17 @@
// IWYU pragma: no_forward_declare Cache
class Image;
+struct TextureOptions {
+ GLint wrap {GL_REPEAT};
+ GLint minFilter {GL_LINEAR}, magFilter {GL_LINEAR};
+};
+
class Texture {
public:
- explicit Texture(const std::filesystem::path & fileName);
- explicit Texture(const Image & image);
- explicit Texture(GLsizei width, GLsizei height, const void * data);
+ explicit Texture(const std::filesystem::path & fileName, TextureOptions = {});
+ explicit Texture(const Image & image, TextureOptions = {});
+ explicit Texture(GLsizei width, GLsizei height, TextureOptions = {});
+ explicit Texture(GLsizei width, GLsizei height, const void * data, TextureOptions = {});
static Cache<Texture, std::filesystem::path> cachedTexture;