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
45 glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &ambient.r);
46 for(unsigned i=0; i<lights.size(); ++i)
48 lights[i]->bind_to(i);
53 void Lighting::unbind()
57 for(unsigned i=0; i<current->lights.size(); ++i)
58 if(current->lights[i])
68 const Lighting *Lighting::current=0;