cubemapper
diff src/texture.h @ 0:8fc9e1d3aad2
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 27 Jul 2017 20:36:12 +0300 |
parents | |
children | d7a29cb7ac8d |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/texture.h Thu Jul 27 20:36:12 2017 +0300 1.3 @@ -0,0 +1,23 @@ 1.4 +#ifndef TEXTURE_H_ 1.5 +#define TEXTURE_H_ 1.6 + 1.7 +#include <gmath/gmath.h> 1.8 + 1.9 +class Texture { 1.10 +private: 1.11 + int width, height; 1.12 + int tex_width, tex_height; 1.13 + unsigned int tex; 1.14 + Mat4 tmat; 1.15 + 1.16 +public: 1.17 + Texture(); 1.18 + ~Texture(); 1.19 + 1.20 + bool load(const char *fname); 1.21 + 1.22 + const Mat4 &texture_matrix() const; 1.23 + void bind(bool loadmat = true) const; 1.24 +}; 1.25 + 1.26 +#endif // TEXTURE_H_