2 #include <msp/gl/extensions/msp_legacy_features.h>
12 vector<LightUnit> LightUnit::units;
14 LightUnit::LightUnit():
18 bool LightUnit::set_light(const Light *l)
20 bool result = (l!=light);
25 unsigned LightUnit::get_n_units()
27 static int count = (MSP_legacy_features ? get_i(GL_MAX_LIGHTS) : 0);
31 LightUnit &LightUnit::get_unit(unsigned n)
34 throw out_of_range("LightUnit::get_unit");
38 unsigned i = units.size();
39 units.resize(n+1, LightUnit());
40 for(; i<units.size(); ++i)
47 LightUnit *LightUnit::find_unit(const Light *l)
49 for(vector<LightUnit>::iterator i=units.begin(); i!=units.end(); ++i)