11 vector<LightUnit> LightUnit::units;
12 LightUnit *LightUnit::cur_unit = 0;
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 = get_i(GL_MAX_LIGHTS);
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)