]> git.tdb.fi Git - libs/gl.git/blob - source/lighting.h
Drop Id tags and copyright notices from files
[libs/gl.git] / source / lighting.h
1 #ifndef MSP_GL_LIGHTING_H_
2 #define MSP_GL_LIGHTING_H_
3
4 #include <vector>
5 #include "bindable.h"
6 #include "color.h"
7 #include "gl.h"
8
9 namespace Msp {
10 namespace GL {
11
12 class Light;
13
14 /**
15 Encapsulates global lighting parameters and a number of individual lights.
16 */
17 class Lighting: public Bindable<Lighting>
18 {
19 private:
20         Color ambient;
21         std::vector<const Light *> lights;
22
23 public:
24         Lighting();
25
26         void set_ambient(const Color &);
27         const Color &get_ambient() const { return ambient; }
28
29         void attach(unsigned, const Light &);
30         void detach(unsigned);
31         void bind() const;
32
33         static void unbind();
34 };
35
36 } // namespace GL
37 } // namespace Msp
38
39 #endif