blob: a09469418ae0416b45e26a7a94ebfea5fae92afe (
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
|