-void Light::bind_to(unsigned i) const
-{
- activate(i);
- bind();
-}
-
-void Light::activate(unsigned i)
-{
- static unsigned max_lights = get_i(GL_MAX_LIGHTS);
-
- if(i>=max_lights)
- throw out_of_range("Light::activate");
-
- if(i>=current_lights.size())
- current_lights.resize(i+1);
-
- current_unit = i;
-}
-
-void Light::unbind()