3 This file is part of libmspgl
4 Copyright © 2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
19 void Lighting::set_ambient(const Color &a)
24 void Lighting::attach(unsigned i, const Light &l)
32 void Lighting::detach(unsigned i)
40 void Lighting::bind() const
42 if(!set_current(this))
46 glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &ambient.r);
47 for(unsigned i=0; i<lights.size(); ++i)
49 lights[i]->bind_to(i);
52 void Lighting::unbind()
54 const Lighting *old = current();
58 for(unsigned i=0; i<old->lights.size(); ++i)