Subversion Repositories gelsvn

Rev

Rev 79 | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 79 Rev 119
1
#ifndef __TEXMAP_H__
1
#ifndef __TEXMAP_H__
2
#define __TEXMAP_H__
2
#define __TEXMAP_H__
3
 
3
 
4
#include <string>
4
#include <string>
5
#include <CGLA/Vec3f.h>
5
#include <CGLA/Vec3f.h>
6
 
6
 
7
 
7
 
8
namespace Geometry
8
namespace Geometry
9
{
9
{
10
	class Texmap 
10
	class Texmap 
11
	{
11
	{
12
		unsigned int id;
12
		unsigned int id;
13
		unsigned char *image;
13
		unsigned char *image;
14
		unsigned int bpp;
14
		unsigned int bpp;
15
		int size_x;
15
		int size_x;
16
		int size_y;
16
		int size_y;
17
		int load_size_x;
17
		int load_size_x;
18
		int load_size_y;
18
		int load_size_y;
19
		std::string name;
19
		std::string name;
20
 
20
 
21
	public:
21
	public:
22
 
22
 
23
		// Constuctor/destructor
23
		// Constuctor/destructor
24
		Texmap();
24
		Texmap();
25
		~Texmap();
25
		~Texmap();
26
 
26
 
27
		const std::string& get_name() const {return name;}
27
		const std::string& get_name() const {return name;}
28
		bool load(const std::string& _name);
28
		bool load(const std::string& _name);
29
		CGLA::Vec3f get_texel(int u, int v);
29
		CGLA::Vec3f get_texel(int u, int v);
30
 
30
 
31
		void gl_init();
31
		void gl_init();
32
		void gl_bind();
32
		void gl_bind();
33
	};
33
	};
34
 
34
 
35
}
35
}
36
#endif
36
#endif
37
 
37
 
38
 
38
 
39
 
39
 
40
 
40