summaryrefslogtreecommitdiff
path: root/gfx/models/texture.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-12-15 01:46:22 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-12-15 01:46:22 +0000
commit14aa604389110f5da25e0c06ca4c6a753c497248 (patch)
treebda3fb51760e28a4de582126cc6e5392ace74e6b /gfx/models/texture.cpp
parentSupport setting framebuffer texture format (diff)
downloadilt-14aa604389110f5da25e0c06ca4c6a753c497248.tar.bz2
ilt-14aa604389110f5da25e0c06ca4c6a753c497248.tar.xz
ilt-14aa604389110f5da25e0c06ca4c6a753c497248.zip
Basic support for saving integer position buffer
Diffstat (limited to 'gfx/models/texture.cpp')
-rw-r--r--gfx/models/texture.cpp6
1 files changed, 6 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);