2 #include <msp/gl/extensions/msp_legacy_features.h>
12 vector<LightUnit> LightUnit::units;
13 LightUnit *LightUnit::cur_unit = 0;
15 LightUnit::LightUnit():
19 bool LightUnit::set_light(const Light *l)
21 bool result = (l!=light);
26 unsigned LightUnit::get_n_units()
28 static int count = (MSP_legacy_features ? get_i(GL_MAX_LIGHTS) : 0);
32 LightUnit &LightUnit::get_unit(unsigned n)
35 throw out_of_range("LightUnit::get_unit");
39 unsigned i = units.size();
40 units.resize(n+1, LightUnit());
41 for(; i<units.size(); ++i)
48 LightUnit *LightUnit::find_unit(const Light *l)
50 for(vector<LightUnit>::iterator i=units.begin(); i!=units.end(); ++i)