]> git.tdb.fi Git - libs/gl.git/blob - source/lightunit.h
Merge branch 'animation-rework'
[libs/gl.git] / source / lightunit.h
1 #ifndef MSP_GL_LIGHTUNIT_H_
2 #define MSP_GL_LIGHTUNIT_H_
3
4 #include <vector>
5
6 namespace Msp {
7 namespace GL {
8
9 class Light;
10
11 class LightUnit
12 {
13 private:
14         unsigned index;
15         const Light *light;
16
17         static std::vector<LightUnit> units;
18
19         LightUnit();
20
21 public:
22         unsigned get_index() const { return index; }
23         bool set_light(const Light *);
24         const Light *get_light() const { return light; }
25
26         static unsigned get_n_units();
27         static LightUnit &get_unit(unsigned i);
28         static LightUnit *find_unit(const Light *);
29 };
30
31 } // namespace GL
32 } // namespace Msp
33
34 #endif