summaryrefslogtreecommitdiff
path: root/include/gltexture.h
blob: c18e6ecf1438d7bff003f8d5c794e6e9041b6def (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#ifndef __GLTEXTURE_H__
#define __GLTEXTURE_H__

#include <GL/gl.h>
#include <SDL.h>
#include <Exceptions.h>

namespace mogltk {
    class texture : public Base {
      public:
          texture(int = 256, int = 256, bool = false) throw (GeneralException);
	  virtual ~texture();
	SDL_Surface * GetSurface() throw (GeneralException);
	void Generate() throw (GeneralException);
	void Bind(bool = true) throw (GeneralException);
	GLuint GetWidth();
	GLuint GetHeight();
	static void Unbind(void);
      private:
        GLuint width, height, tex;
	SDL_Surface * surface;
	bool planar;
    };
};

#endif