X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterials%2Flighting.h;h=335e78872a23f2a0f9acfcf4b05ffddfa0fd2f56;hb=190a7e11237351f6b730c28f7b16f183e8adc69c;hp=d4e6b5942cc09d660857d661b2b8bb700e4d71e4;hpb=5008778dbb1840bf7c6d479800d2b932f8386fb2;p=libs%2Fgl.git diff --git a/source/materials/lighting.h b/source/materials/lighting.h index d4e6b594..335e7887 100644 --- a/source/materials/lighting.h +++ b/source/materials/lighting.h @@ -12,8 +12,9 @@ namespace GL { class Light; /** -Encapsulates global lighting parameters and any number of individual light -sources. +Combines multiple light sources with global lighting parameters. + +This class also stores ProgramData for using the lights in shaders. */ class Lighting { @@ -24,7 +25,6 @@ public: static ActionMap shared_actions; public: - Loader(Lighting &); Loader(Lighting &, Collection &); private: @@ -56,7 +56,8 @@ private: public: Lighting(); - /** Sets the ambient lighting color. Affects all surfaces in the scene. */ + /** Sets the ambient lighting color. Affects all surfaces in an equal + amount. */ void set_ambient(const Color &); const Color &get_ambient() const { return ambient; } @@ -78,6 +79,8 @@ public: /** Detaches a light source. If the light was not attached, does nothing. */ void detach(const Light &); + int find_light_index(const Light &) const; + const ProgramData &get_shader_data() const; void set_debug_name(const std::string &);