12 void Lighting::set_ambient(const Color &a)
17 void Lighting::attach(unsigned i, const Light &l)
25 void Lighting::detach(unsigned i)
33 void Lighting::bind() const
35 if(!set_current(this))
39 glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &ambient.r);
40 for(unsigned i=0; i<lights.size(); ++i)
42 lights[i]->bind_to(i);
45 void Lighting::unbind()
47 const Lighting *old = current();
51 for(unsigned i=0; i<old->lights.size(); ++i)
53 Light::unbind_from(i);