1 #ifndef MSP_GL_LIGHT_H_
2 #define MSP_GL_LIGHT_H_
37 void update_parameter(int, int = -1) const;
40 void set_diffuse(const Color &c);
41 void set_specular(const Color &c);
42 const Color &get_diffuse() const { return diffuse; }
43 const Color &get_specular() const { return specular; }
45 void set_position(const Vector4 &);
46 const Vector4 &get_position() const { return position; }
47 void set_spot_direction(const Vector3 &);
48 void set_spot_exponent(float);
49 void set_spot_cutoff(float);
50 const Vector3 &get_spot_direction() const { return spot_dir; }
51 float get_spot_exponent() const { return spot_exp; }
52 float get_spot_cutoff() const { return spot_cutoff; }
53 void set_attenuation(float, float, float);
54 const float *get_attenuation() const { return attenuation; }
56 void bind() const { return bind_to(0); }
57 void bind_to(unsigned) const;
59 static const Light *current(unsigned = 0);
60 static void unbind() { return unbind_from(0); }
61 static void unbind_from(unsigned);