X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmaterials%2Flight.h;h=189380cdb7a1e2f1b619423761b708bfadc8b2dc;hp=c0f929cf24377cd4771793ba0fcee889b4736012;hb=HEAD;hpb=3bc34893905a2df622894aadcb6669f27f186772 diff --git a/source/materials/light.h b/source/materials/light.h index c0f929cf..189380cd 100644 --- a/source/materials/light.h +++ b/source/materials/light.h @@ -19,7 +19,7 @@ implement different types of lights. Lights are usually grouped with a Lighting object, which can be used in a Sequence::Step. -Lights do not cast shadows by themselves. See ShadowMap for that. +Shadows can be added to lights by using the ShadowMap effect. */ class Light: public Placeable { @@ -48,22 +48,22 @@ public: }; protected: - Color color; - unsigned generation; + Color color = { 1.0f }; + unsigned generation = 0; - Light(); + Light() = default; public: - virtual ~Light() { } + virtual ~Light() = default; - /** Sets the color of the Light. */ + /** Sets the color of the light. */ void set_color(const Color &); const Color &get_color() const { return color; } unsigned get_generation() const { return generation; } - /** Updates a ProgramData object with the uniforms for the Light. A light - source index must be passed in. Primarily used by Lighting. */ + /** Updates a ProgramData object with the uniform values for the light. A + light source index must be passed in. */ void update_shader_data(ProgramData &, unsigned) const; protected: