From 541c00c93fcd98f766cce661aa83ef4ffe713e57 Mon Sep 17 00:00:00 2001 From: pixel Date: Fri, 28 Mar 2003 12:30:26 +0000 Subject: First part of the backend separation --- include/texture.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'include/texture.h') diff --git a/include/texture.h b/include/texture.h index 904eeae..4f14ba4 100644 --- a/include/texture.h +++ b/include/texture.h @@ -2,6 +2,7 @@ #define __TEXTURE_H__ #include +#include #include #include #include @@ -9,22 +10,29 @@ namespace mogltk { class texture : public Base { public: - texture(int = 256, int = 256) throw (GeneralException); - texture(Handle *) throw (GeneralException); + 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) ; - Uint32 GetWidth(); - Uint32 GetHeight(); + void Generate(); + void Bind(bool = true); + GLuint GetWidth(); + GLuint GetHeight(); + static void Unbind(void); + void Taint(void); private: - Uint32 width, height; + 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; }; }; -- cgit v1.2.3