From ca36e42922326a798c4fdd950b3630fe92522551 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Tue, 1 Nov 2022 01:23:43 +0000 Subject: Somewhat dirty but functional helper to save a texture Useful for debugging and not much else. --- gfx/models/texture.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'gfx/models/texture.h') 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 #include #include +#include // 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; }; -- cgit v1.2.3