3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
18 x(0), y(0), z(1), w(0),
19 sdx(0), sdy(0), sdz(-1),
24 void Light::set_ambient(const Color &c)
29 void Light::set_diffuse(const Color &c)
34 void Light::set_specular(const Color &c)
39 void Light::set_position(float x_, float y_, float z_, float w_)
47 void Light::apply() const
52 void Light::apply_to(unsigned l) const
56 glLightfv(l, GL_AMBIENT, &ambient.r);
57 glLightfv(l, GL_DIFFUSE, &diffuse.r);
58 glLightfv(l, GL_SPECULAR, &specular.r);
59 glLightfv(l, GL_POSITION, &x);
62 unsigned Light::current=0;