X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fmaterials%2Flight.h;h=189380cdb7a1e2f1b619423761b708bfadc8b2dc;hp=606ec67325812d535d305c5756ca82bcfb439528;hb=HEAD;hpb=adc26a2e141a2853b6c5025130c46a46cece4b84 diff --git a/source/materials/light.h b/source/materials/light.h index 606ec673..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,21 +48,22 @@ public: }; protected: - Color color; - unsigned generation; + Color color = { 1.0f }; + unsigned generation = 0; + Light() = default; public: - 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: