]> git.tdb.fi Git - libs/gl.git/blobdiff - source/lighting.cpp
Drop Id tags and copyright notices from files
[libs/gl.git] / source / lighting.cpp
index 44a01a5e6ab6ade990bd324d0ea7a0f97a5c8e85..0af2416c14729788d411e747b91e8bcedfa0303c 100644 (file)
@@ -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; i<lights.size(); ++i)
                if(lights[i])
@@ -57,11 +50,9 @@ void Lighting::unbind()
 
        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