X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flight.h;h=e9b032694565e7e857e32fada5d84a0d70013505;hb=efe80f5a696b4a3be2378dc6d635c89676afa12d;hp=cbf95add001d86766e9c2826658240597705d761;hpb=832fb1872e6e5e664e2e5130122fd2f74729ed42;p=libs%2Fgl.git diff --git a/source/light.h b/source/light.h index cbf95add..e9b03269 100644 --- a/source/light.h +++ b/source/light.h @@ -8,6 +8,7 @@ Distributed under the LGPL #ifndef MSP_GL_LIGHT_H_ #define MSP_GL_LIGHT_H_ +#include #include "color.h" namespace Msp { @@ -25,7 +26,8 @@ private: float spot_cutoff; float attenuation[3]; - static unsigned current; + static unsigned current_unit; + static std::vector current_lights; public: Light(); @@ -33,10 +35,11 @@ public: void set_diffuse(const Color &c); void set_specular(const Color &c); void set_position(float, float, float, float); - void apply(); - void apply_to(unsigned); + void bind() const; + void bind_to(unsigned) const; static void activate(unsigned); + static void unbind(); }; } // namespace GL