diff options
Diffstat (limited to 'gfx')
-rw-r--r-- | gfx/models/texture.cpp | 6 | ||||
-rw-r--r-- | gfx/models/texture.h | 1 |
2 files changed, 7 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);
diff --git a/gfx/models/texture.h b/gfx/models/texture.h index 31ffaa5..cc0c07e 100644 --- a/gfx/models/texture.h +++ b/gfx/models/texture.h @@ -24,6 +24,7 @@ public: void bind(GLenum unit = GL_TEXTURE0) const;
+ void save(const glm::ivec2 & size, const char * path) const;
static void save(const glTexture &, const glm::ivec2 & size, const char * path);
static void saveDepth(const glTexture &, const glm::ivec2 & size, const char * path);
static void saveNormal(const glTexture &, const glm::ivec2 & size, const char * path);
|