3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_LIGHT_H_
9 #define MSP_GL_LIGHT_H_
30 static unsigned current_unit;
31 static std::vector<const Light *> current_lights;
36 void set_ambient(const Color &c);
37 void set_diffuse(const Color &c);
38 void set_specular(const Color &c);
39 const Color &get_ambient() const { return ambient; }
40 const Color &get_diffuse() const { return diffuse; }
41 const Color &get_specular() const { return specular; }
43 void set_position(const Vector4 &);
44 const Vector4 &get_position() const { return position; }
45 void set_spot_direction(const Vector3 &);
46 void set_spot_exponent(float);
47 void set_spot_cutoff(float);
48 const Vector3 &get_spot_direction() const { return spot_dir; }
49 float get_spot_exponent() const { return spot_exp; }
50 float get_spot_cutoff() const { return spot_cutoff; }
51 void set_attenuation(float, float, float);
52 const float *get_attenuation() const { return attenuation; }
55 void bind_to(unsigned) const;
58 void set_position(float x, float y, float z, float w) { set_position(Vector4(x, y, z, w)); }
60 static void activate(unsigned);