summaryrefslogtreecommitdiff
path: root/includes/gltexture.h
blob: 84edaa8e187d4c4fdec2251fdfdbcff3c9d347e0 (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
#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();
      private:
        GLuint width, height, tex;
	SDL_Surface * surface;
	bool planar;
    };
};

#endif