X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmaterials%2Flight.h;h=d097d04ae435157ebb1c4ddd18cc2bd5857d37d0;hp=c7e281887651c7f3d5495f86c34960055d9429e9;hb=615f1717f32064a7adb2b848e8646c2c3cf11f61;hpb=f87993e0748f711b0b2439fe6ab4945bddad25c0 diff --git a/source/materials/light.h b/source/materials/light.h index c7e28188..d097d04a 100644 --- a/source/materials/light.h +++ b/source/materials/light.h @@ -35,17 +35,15 @@ public: private: void attenuation(float, float, float); - void diffuse(float, float, float); + void color(float, float, float); void position(float, float, float, float); - void specular(float, float, float); void spot_direction(float, float, float); void spot_exponent(float); void spot_cutoff(float); }; private: - Color diffuse; - Color specular; + Color color; Vector4 position; Vector3 spot_dir; Vector3 direction; @@ -60,16 +58,16 @@ private: void update_matrix(); public: - /** Sets the diffuse (direction-independent) color of the Light. Provided - to shaders with the name light_sources[i].diffuse. */ - void set_diffuse(const Color &c); + /** Sets the color of the Light. Provided + to shaders as light_sources[i].color. */ + void set_color(const Color &); - /** Sets the specular (direction-dependent) color of the Light. Provided to - shaders with the name light_sources[i].specular. */ - void set_specular(const Color &c); + const Color &get_color() const { return color; } - const Color &get_diffuse() const { return diffuse; } - const Color &get_specular() const { return specular; } + DEPRECATED void set_diffuse(const Color &c) { set_color(c); } + DEPRECATED void set_specular(const Color &) { } + DEPRECATED const Color &get_diffuse() const { return color; } + DEPRECATED const Color &get_specular() const { return color; } /** Sets the postion and orientation of the Light from a matrix. Negative Z axis is used as the spot direction, other axes are ignored. */