cubemapper

view src/texture.h @ 4:2bfafdced01a

added README, COPYING, and copyright headers
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 30 Jul 2017 16:11:19 +0300
parents d7a29cb7ac8d
children
line source
1 /*
2 Cubemapper - a program for converting panoramic images into cubemaps
3 Copyright (C) 2017 John Tsiombikas <nuclear@member.fsf.org>
5 This program is free software: you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation, either version 3 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
17 */
18 #ifndef TEXTURE_H_
19 #define TEXTURE_H_
21 #include <gmath/gmath.h>
23 class Texture {
24 private:
25 int width, height;
26 int tex_width, tex_height;
27 unsigned int tex;
28 Mat4 tmat;
30 public:
31 Texture();
32 ~Texture();
34 int get_width() const;
35 int get_height() const;
37 bool load(const char *fname);
39 const Mat4 &texture_matrix() const;
40 void bind(bool loadmat = true) const;
41 };
43 #endif // TEXTURE_H_