vrchess

view src/texture.h @ 0:b326d53321f7

initial commit
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 25 Apr 2014 05:20:53 +0300
parents
children 879194e4b1f0
line source
1 #ifndef TEXTURE_H_
2 #define TEXTURE_H_
4 #include "image.h"
6 class Texture {
7 private:
8 Image img;
9 unsigned int tex;
10 unsigned int type;
12 public:
13 Texture();
14 ~Texture();
16 void create2d(int xsz, int ysz);
17 void destroy();
19 void set_image(const Image &img);
20 Image &get_image();
21 const Image &get_image() const;
23 unsigned int get_texture_id() const;
24 void bind(int tunit = 0) const;
26 bool load(const char *fname);
27 };
29 #endif // TEXTURE_H_