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