From 5d7bb934068b0f2ce8b6315517a005cc2c1305f5 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Wed, 15 Mar 2023 02:08:43 +0000 Subject: Texture member to save the texture as a TGA --- gfx/models/texture.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'gfx/models/texture.cpp') 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 @@ -62,6 +62,12 @@ Texture::save(const glTexture & texture, GLenum format, GLenum type, const glm:: tga.msync(MS_ASYNC); } +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) { -- cgit v1.2.3