aboutsummaryrefslogtreecommitdiff
path: root/src/dtx/dtx.h
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-12-04 13:58:02 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2025-12-15 23:04:39 +0100
commit600ff28dd73f2cf17725382b68a4b1b2573f2e34 (patch)
treea105c686458d8998438652aeca6299cf9000edcd /src/dtx/dtx.h
downloadglobalops-abc.tar.gz
First commitHEADabcmain
Diffstat (limited to 'src/dtx/dtx.h')
-rw-r--r--src/dtx/dtx.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/dtx/dtx.h b/src/dtx/dtx.h
new file mode 100644
index 0000000..24a7a7b
--- /dev/null
+++ b/src/dtx/dtx.h
@@ -0,0 +1,37 @@
+#ifndef DTX_H
+#define DTX_H
+
+#include <rez/file.h>
+#include <GL/gl.h>
+
+class dtx
+{
+public:
+ typedef std::vector<unsigned char> pixdata;
+
+ dtx();
+ ~dtx();
+ int parse(rez::file &f);
+ int draw() const;
+
+private:
+
+ enum bpp
+ {
+ bpp_8_pal,
+ bpp_8,
+ bpp_16,
+ bpp_32,
+ bpp_s3tc_dxt1,
+ bpp_s3tc_dxt3,
+ bpp_s3tc_dxt5,
+ bpp_32_pal,
+
+ n_bpp
+ } bpp;
+
+ GLuint texture;
+ unsigned w, h;
+};
+
+#endif