vrchess
view src/image.h @ 12:778ed91cb7fd
fullscreen to rift now works in extended mode with freeglut
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Sat, 23 Aug 2014 12:03:29 +0300 |
parents | b326d53321f7 |
children |
line source
1 #ifndef IMAGE_H_
2 #define IMAGE_H_
4 class Image {
5 private:
6 int width, height;
7 unsigned char *pixels;
8 bool own_pixels;
10 public:
11 Image();
12 ~Image();
14 Image(const Image &img);
15 Image &operator =(const Image &img);
17 void create(int xsz, int ysz, unsigned char *pix = 0);
18 void destroy();
20 int get_width() const;
21 int get_height() const;
23 void set_pixels(int xsz, int ysz, unsigned char *pix);
24 unsigned char *get_pixels() const;
26 bool load(const char *fname);
27 };
29 #endif // IMAGE_H_