textpsys
diff src/image.h @ 0:a4ffd9e6984c
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Wed, 19 Aug 2015 09:13:48 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/image.h Wed Aug 19 09:13:48 2015 +0300 1.3 @@ -0,0 +1,25 @@ 1.4 +#ifndef IMAGE_H_ 1.5 +#define IMAGE_H_ 1.6 + 1.7 +#include "vec3.h" 1.8 + 1.9 +class Image { 1.10 +private: 1.11 + unsigned char *own_pixels; 1.12 + 1.13 +public: 1.14 + int width, height; 1.15 + unsigned char *pixels; 1.16 + unsigned int texture; 1.17 + int tex_width, tex_height; 1.18 + 1.19 + Image(); 1.20 + ~Image(); 1.21 + 1.22 + void create(int xsz, int ysz, unsigned char *pix = 0); 1.23 + void destroy(); 1.24 + 1.25 + unsigned int gen_texture(); 1.26 +}; 1.27 + 1.28 +#endif // IMAGE_H_