X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Flighting.cpp;h=0af2416c14729788d411e747b91e8bcedfa0303c;hp=44a01a5e6ab6ade990bd324d0ea7a0f97a5c8e85;hb=f14435e58bfa0fa697a06ba9a454bb30cd37d9d8;hpb=42ace9ac1350d3ae009bdd2fb335ac1e57d1b36b diff --git a/source/lighting.cpp b/source/lighting.cpp index 44a01a5e..0af2416c 100644 --- a/source/lighting.cpp +++ b/source/lighting.cpp @@ -1,10 +1,3 @@ -/* $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" @@ -42,7 +35,7 @@ void Lighting::bind() const if(!set_current(this)) return; - enable(LIGHTING); + enable(GL_LIGHTING); glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &ambient.r); for(unsigned i=0; ilights.size(); ++i) if(old->lights[i]) - { - Light::activate(i); - Light::unbind(); - } - disable(LIGHTING); + Light::unbind_from(i); + + disable(GL_LIGHTING); } } // namespace GL