]> git.tdb.fi Git - libs/gl.git/blob - source/texunit.h
Add Id tags and copyright notices to files
[libs/gl.git] / source / texunit.h
1 /* $Id$
2
3 This file is part of libmspgl
4 Copyright © 2007  Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
6 */
7
8 #ifndef MSP_GL_TEXUNIT_H_
9 #define MSP_GL_TEXUNIT_H_
10
11 #include <vector>
12
13 namespace Msp {
14 namespace GL {
15
16 class Texture;
17
18 class TexUnit
19 {
20 public:
21         TexUnit();
22         bool set_texture(const Texture *);
23         const Texture *get_texture() { return texture; }
24         //TexEnv &get_env() { return env; }
25
26         static TexUnit &activate(unsigned);
27         static TexUnit &current();
28 private:
29         const Texture *texture;
30         //TexEnv env;
31
32         static std::vector<TexUnit> units;
33         static TexUnit *cur_unit;
34 };
35
36 } // namespace GL
37 } // namespace Msp
38
39 #endif