-/* $Id$
-
-This file is part of libmspgl
-Copyright © 2008 Mikko Rasa, Mikkosoft Productions
-Distributed under the LGPL
-*/
-
#include "light.h"
#include "lighting.h"
#include "misc.h"
if(!set_current(this))
return;
- enable(LIGHTING);
+ enable(GL_LIGHTING);
glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &ambient.r);
for(unsigned i=0; i<lights.size(); ++i)
if(lights[i])
for(unsigned i=0; i<old->lights.size(); ++i)
if(old->lights[i])
- {
- Light::activate(i);
- Light::unbind();
- }
- disable(LIGHTING);
+ Light::unbind_from(i);
+
+ disable(GL_LIGHTING);
}
} // namespace GL