#ifndef __GLTEXTURE_H__ #define __GLTEXTURE_H__ #include #include #include namespace mogltk { class texture : public Base { public: texture(int = 256, int = 256, bool = false) throw (GeneralException); virtual ~texture(); SDL_Surface * GetSurface(); void Generate(); void Bind(bool = true); GLuint GetWidth(); GLuint GetHeight(); static void Unbind(void); private: GLuint width, height, tex; bool texture_allocated; SDL_Surface * surface; bool planar; #ifdef TRACE_TEXTURES static texture * header; static texture * footer; texture * next, * prev; #endif }; }; #endif