summaryrefslogtreecommitdiff
path: root/gfx/models/texture.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 16:34:56 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2023-04-14 16:34:56 +0100
commitb4ede2fd89d0effb44ebae15862427de9a147476 (patch)
tree715ed03af8c466b490d4f83183d31a5d57352245 /gfx/models/texture.h
parentCreate texture fragments from materials (diff)
downloadilt-b4ede2fd89d0effb44ebae15862427de9a147476.tar.bz2
ilt-b4ede2fd89d0effb44ebae15862427de9a147476.tar.xz
ilt-b4ede2fd89d0effb44ebae15862427de9a147476.zip
Define our own enum for texture mapmode
Diffstat (limited to 'gfx/models/texture.h')
-rw-r--r--gfx/models/texture.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/gfx/models/texture.h b/gfx/models/texture.h
index 68ec649..86e76a0 100644
--- a/gfx/models/texture.h
+++ b/gfx/models/texture.h
@@ -9,9 +9,16 @@
class Image;
struct TextureOptions {
- GLint wrap {GL_REPEAT};
+ enum class MapMode {
+ Repeat,
+ Clamp,
+ Mirror,
+ Decal,
+ };
+ MapMode wrapU {MapMode::Repeat}, wrapV {MapMode::Repeat};
GLint minFilter {GL_LINEAR}, magFilter {GL_LINEAR};
GLenum type {GL_TEXTURE_2D};
+ static GLint glMapMode(MapMode);
};
class Texture {