xglcomp
diff src/texture.h @ 4:57050ca14de6
forgot to add texture.h/cc
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Fri, 22 Jan 2016 22:33:34 +0200 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/texture.h Fri Jan 22 22:33:34 2016 +0200 1.3 @@ -0,0 +1,24 @@ 1.4 +#ifndef TEXTURE_H_ 1.5 +#define TEXTURE_H_ 1.6 + 1.7 +#include <X11/Xlib.h> 1.8 + 1.9 +class Texture { 1.10 +private: 1.11 + unsigned int tex; 1.12 + int width, height; 1.13 + 1.14 +public: 1.15 + Texture(); 1.16 + ~Texture(); 1.17 + 1.18 + void set_image(int x, int y, unsigned char *pix = 0); 1.19 + void set_image(Display *dpy, Pixmap pixmap); 1.20 + 1.21 + int get_width() const; 1.22 + int get_height() const; 1.23 + 1.24 + unsigned int get_id() const; 1.25 +}; 1.26 + 1.27 +#endif // TEXTURE_H_