From c00cd54ca5ed959cbccff7aa7261fb5025d1832c Mon Sep 17 00:00:00 2001 From: pixel Date: Wed, 26 Mar 2003 14:07:43 +0000 Subject: bleh --- include/texture.h | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 include/texture.h (limited to 'include/texture.h') diff --git a/include/texture.h b/include/texture.h new file mode 100644 index 0000000..4f5e162 --- /dev/null +++ b/include/texture.h @@ -0,0 +1,39 @@ +#ifndef __GLTEXTURE_H__ +#define __GLTEXTURE_H__ + +#include +#include +#include +#include +#include + +namespace mogltk { + class texture : public Base { + public: + texture(int = 256, int = 256, bool = false) throw (GeneralException); + texture(Handle *, bool = false) throw (GeneralException); + virtual ~texture(); + SDL_Surface * GetSurface(); + Uint32 * GetPixels(); + static SDL_Surface * LoadNTEX(Handle * h) throw (GeneralException) ; + void Generate(); + void Bind(bool = true); + GLuint GetWidth(); + GLuint GetHeight(); + static void Unbind(void); + void Taint(void); + private: + GLuint width, height, tex; + bool texture_allocated; + SDL_Surface * surface; + bool planar, tainted; +#ifdef TRACE_TEXTURES + static texture * header; + static texture * footer; + texture * next, * prev; +#endif + static texture * active; + }; +}; + +#endif -- cgit v1.2.3