]> git.tdb.fi Git - libs/gl.git/blob - source/texunit.h
Drop Id tags and copyright notices from files
[libs/gl.git] / source / texunit.h
1 #ifndef MSP_GL_TEXUNIT_H_
2 #define MSP_GL_TEXUNIT_H_
3
4 #include <vector>
5
6 namespace Msp {
7 namespace GL {
8
9 class TexEnv;
10 class Texture;
11
12 class TexUnit
13 {
14 private:
15         const Texture *texture;
16         const TexEnv *texenv;
17
18         static std::vector<TexUnit> units;
19         static TexUnit *cur_unit;
20
21 public:
22         TexUnit();
23
24         bool set_texture(const Texture *);
25         const Texture *get_texture() const { return texture; }
26         bool set_texenv(const TexEnv *);
27         const TexEnv *get_texenv() const { return texenv; }
28
29         static unsigned get_n_units();
30         static TexUnit &activate(unsigned);
31         static TexUnit &current();
32 };
33
34 } // namespace GL
35 } // namespace Msp
36
37 #endif