diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-01 01:23:43 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-11-01 01:23:43 +0000 |
commit | ca36e42922326a798c4fdd950b3630fe92522551 (patch) | |
tree | d716df1e6424c30c1b93cd5a30caa817144fcf09 /gfx/models/texture.h | |
parent | Save window size as a member variable (diff) | |
download | ilt-ca36e42922326a798c4fdd950b3630fe92522551.tar.bz2 ilt-ca36e42922326a798c4fdd950b3630fe92522551.tar.xz ilt-ca36e42922326a798c4fdd950b3630fe92522551.zip |
Somewhat dirty but functional helper to save a texture
Useful for debugging and not much else.
Diffstat (limited to 'gfx/models/texture.h')
-rw-r--r-- | gfx/models/texture.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/gfx/models/texture.h b/gfx/models/texture.h index 2bbf1f4..09538b3 100644 --- a/gfx/models/texture.h +++ b/gfx/models/texture.h @@ -3,6 +3,7 @@ #include <cache.h>
#include <filesystem>
#include <glArrays.h>
+#include <glm/fwd.hpp>
// IWYU pragma: no_forward_declare Cache
class Image;
@@ -17,6 +18,8 @@ public: void bind(GLenum unit = GL_TEXTURE0) const;
+ static void save(const glTexture &, const glm::ivec2 & size, const char * path);
+
private:
glTexture m_texture;
};
|