diff options
Diffstat (limited to 'kue/texture.h')
-rw-r--r-- | kue/texture.h | 38 |
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 |