diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-15 02:08:43 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2023-03-15 02:08:43 +0000 |
commit | 5d7bb934068b0f2ce8b6315517a005cc2c1305f5 (patch) | |
tree | cbe2ae7d51e6ea9c03b50998d19210ca016d0173 /gfx/models/texture.cpp | |
parent | Add support for setting Texture options on construction (diff) | |
download | ilt-5d7bb934068b0f2ce8b6315517a005cc2c1305f5.tar.bz2 ilt-5d7bb934068b0f2ce8b6315517a005cc2c1305f5.tar.xz ilt-5d7bb934068b0f2ce8b6315517a005cc2c1305f5.zip |
Texture member to save the texture as a TGA
Diffstat (limited to 'gfx/models/texture.cpp')
-rw-r--r-- | gfx/models/texture.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gfx/models/texture.cpp b/gfx/models/texture.cpp index 87b73e7..639ae0f 100644 --- a/gfx/models/texture.cpp +++ b/gfx/models/texture.cpp @@ -63,6 +63,12 @@ Texture::save(const glTexture & texture, GLenum format, GLenum type, const glm:: }
void
+Texture::save(const glm::ivec2 & size, const char * path) const
+{
+ save(m_texture, GL_BGR, GL_UNSIGNED_BYTE, size, 3, path, 2);
+}
+
+void
Texture::save(const glTexture & texture, const glm::ivec2 & size, const char * path)
{
save(texture, GL_BGR, GL_UNSIGNED_BYTE, size, 3, path, 2);
|