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