3 This file is part of libmspgl
4 Copyright © 2007 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
17 x(0), y(0), z(1), w(0),
18 sdx(0), sdy(0), sdz(-1),
23 void Light::set_ambient(const Color &c)
28 void Light::set_diffuse(const Color &c)
33 void Light::set_specular(const Color &c)
38 void Light::set_position(float x_, float y_, float z_, float w_)
51 void Light::apply_to(unsigned l)
54 glLightfv(l, GL_AMBIENT, &ambient.r);
55 glLightfv(l, GL_DIFFUSE, &diffuse.r);
56 glLightfv(l, GL_SPECULAR, &specular.r);
57 glLightfv(l, GL_POSITION, &x);
60 unsigned Light::current=0;