]> git.tdb.fi Git - libs/gl.git/blobdiff - source/light.h
Rewrite light binding to match textures
[libs/gl.git] / source / light.h
index 658e828781ae32af78f1e70fafe99e984cb99ac7..cf9ab8a1acb69cdbec2cdfead4ad2580e66f40e7 100644 (file)
@@ -19,9 +19,6 @@ private:
        float spot_cutoff;
        float attenuation[3];
 
-       static unsigned current_unit;
-       static std::vector<const Light *> current_lights;
-
 public:
        Light();
 
@@ -41,11 +38,11 @@ public:
        void set_attenuation(float, float, float);
        const float *get_attenuation() const { return attenuation; }
 
-       void bind() const;
+       void bind() const { return bind_to(0); }
        void bind_to(unsigned) const;
 
-       static void activate(unsigned);
-       static void unbind();
+       static const Light *current(unsigned = 0);
+       static void unbind() { return unbind_from(0); }
        static void unbind_from(unsigned);
 };