summaryrefslogtreecommitdiff
path: root/gfx/models
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/models')
-rw-r--r--gfx/models/texture.cpp6
-rw-r--r--gfx/models/texture.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/gfx/models/texture.cpp b/gfx/models/texture.cpp
index 1685d34..35f8d35 100644
--- a/gfx/models/texture.cpp
+++ b/gfx/models/texture.cpp
@@ -104,6 +104,12 @@ Texture::save(const glTexture & texture, const char * path)
}
void
+Texture::savePosition(const glTexture & texture, const char * path)
+{
+ save(texture, GL_BGR_INTEGER, GL_UNSIGNED_BYTE, 3, path, 2);
+}
+
+void
Texture::saveDepth(const glTexture & texture, const char * path)
{
save(texture, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, 1, path, 3);
diff --git a/gfx/models/texture.h b/gfx/models/texture.h
index 5e1b440..5d40b39 100644
--- a/gfx/models/texture.h
+++ b/gfx/models/texture.h
@@ -40,6 +40,7 @@ public:
static void save(const glTexture &, const char * path);
static void saveDepth(const glTexture &, const char * path);
static void saveNormal(const glTexture &, const char * path);
+ static void savePosition(const glTexture &, const char * path);
protected:
static void save(const glTexture &, GLenum, GLenum, uint8_t channels, const char * path, uint8_t tgaFormat);