summaryrefslogtreecommitdiff
path: root/texture.h
blob: 9fea06f1f1c8e0f19bb10f1c245bd8a1437861d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#ifndef _TEXTURE_H_
#define _TEXTURE_H_

#include <stdint.h>
#include <string>

class Texture {
	public:
		Texture();
		Texture(const std::string& filename);
		
		void load(const std::string& filename);
		
		void bind() const;
		unsigned int tex() const;
		unsigned int w() const;
		unsigned int h() const;
	protected:
		void build(void* data, unsigned int format, unsigned int w, unsigned int h);
		unsigned int width;
		unsigned int height;
		unsigned int texture;
};

#endif // _TEXTURE_H_