summaryrefslogtreecommitdiff
path: root/include/texture.h
diff options
context:
space:
mode:
authorpixel <pixel>2003-03-28 12:30:26 +0000
committerpixel <pixel>2003-03-28 12:30:26 +0000
commit541c00c93fcd98f766cce661aa83ef4ffe713e57 (patch)
tree2300eff5c56164578988d4f4d57147c60657c7ad /include/texture.h
parentbe0486797260377246c1ea1229cca27c19c64ad2 (diff)
First part of the backend separation
Diffstat (limited to 'include/texture.h')
-rw-r--r--include/texture.h18
1 files changed, 13 insertions, 5 deletions
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 <SDL.h>
+#include <SDL_opengl.h>
#include <Handle.h>
#include <Exceptions.h>
#include <generic.h>
@@ -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;
};
};