summaryrefslogtreecommitdiffstats
path: root/kue/texture.h
diff options
context:
space:
mode:
authorMavridis Philippe <mavridisf@gmail.com>2024-08-07 19:13:02 +0300
committerMavridis Philippe <mavridisf@gmail.com>2024-08-07 19:23:24 +0300
commit04b5a62b8d9f5ff8240f25361046f2a5d58e8262 (patch)
tree98b126454cdf68d544e138d7e8b31d5fd45b72c2 /kue/texture.h
parent83ba00b7e569587d50383ff06a70148042ca780e (diff)
downloadtdegames-feat/kue.tar.gz
tdegames-feat/kue.zip
Add Kue billiards gamefeat/kue
Signed-off-by: Mavridis Philippe <mavridisf@gmail.com>
Diffstat (limited to 'kue/texture.h')
-rw-r--r--kue/texture.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/kue/texture.h b/kue/texture.h
new file mode 100644
index 00000000..cac39d87
--- /dev/null
+++ b/kue/texture.h
@@ -0,0 +1,38 @@
+#ifndef _TEXTURE_H
+#define _TEXTURE_H
+
+#include <tqstring.h>
+
+class KueTexture {
+ public:
+ KueTexture(const TQString &filename);
+ KueTexture(unsigned int texture_id);
+ KueTexture(const KueTexture &);
+ ~KueTexture();
+
+ bool makeCurrent();
+
+ // Is this a null texture?
+ bool isNull();
+ // The null texture
+ static KueTexture null();
+
+ protected:
+ // Loads the texture immediately
+ void load();
+
+ // The filename of the texture
+ // Will be a null string for textures created using the texture_id
+ // version of the constructor
+ TQString _filename;
+
+ // The texture ID for the texture
+ // Undefined until a texture is loaded, 0 for the null texture
+ unsigned int _texture_id;
+
+ // Stores if the texture is currently loaded or not
+ // This is required to support loading file-backed textures on demand
+ bool _loaded;
+};
+
+#endif // _TEXTURE_H