1 #ifndef MSP_GL_LIGHT_H_
2 #define MSP_GL_LIGHT_H_
23 static unsigned current_unit;
24 static std::vector<const Light *> current_lights;
29 void set_ambient(const Color &c);
30 void set_diffuse(const Color &c);
31 void set_specular(const Color &c);
32 const Color &get_ambient() const { return ambient; }
33 const Color &get_diffuse() const { return diffuse; }
34 const Color &get_specular() const { return specular; }
36 void set_position(const Vector4 &);
37 const Vector4 &get_position() const { return position; }
38 void set_spot_direction(const Vector3 &);
39 void set_spot_exponent(float);
40 void set_spot_cutoff(float);
41 const Vector3 &get_spot_direction() const { return spot_dir; }
42 float get_spot_exponent() const { return spot_exp; }
43 float get_spot_cutoff() const { return spot_cutoff; }
44 void set_attenuation(float, float, float);
45 const float *get_attenuation() const { return attenuation; }
48 void bind_to(unsigned) const;
51 void set_position(float x, float y, float z, float w) { set_position(Vector4(x, y, z, w)); }
53 static void activate(unsigned);
55 static void unbind_from(unsigned);