Subversion Repositories gelsvn

Rev

Details | Last modification | View Log | RSS feed

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