X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fmaterials%2Funlitmaterial.h;h=f4f1086d32c68acd4aca0b557dd4d68b03551aa3;hb=HEAD;hp=22e226917da00298d7c8934f3adedae0eed86c0e;hpb=842c817bb679a5a0abc05e8149e2e6e0ae1a0412;p=libs%2Fgl.git diff --git a/source/materials/unlitmaterial.h b/source/materials/unlitmaterial.h index 22e22691..f4f1086d 100644 --- a/source/materials/unlitmaterial.h +++ b/source/materials/unlitmaterial.h @@ -6,6 +6,10 @@ namespace Msp { namespace GL { +/** +A material which performs no lighting calculations at all. Useful for HUD +graphics. +*/ class UnlitMaterial: public Material { public: @@ -15,7 +19,6 @@ public: static ActionMap shared_actions; public: - Loader(UnlitMaterial &); Loader(UnlitMaterial &, Collection &); private: @@ -25,9 +28,11 @@ public: }; private: - const Texture *texture; - Color tint; - bool vertex_color; + const Texture *texture = 0; + Color color; + bool vertex_color = false; + + static const Tag texture_tags[]; public: UnlitMaterial(); @@ -36,10 +41,11 @@ protected: virtual void fill_program_info(std::string &, std::map &) const; public: - virtual void attach_textures_to(Texturing &, ProgramData &) const; + virtual const Tag *get_texture_tags() const { return texture_tags; } + virtual const Texture *get_texture(Tag) const; void set_texture(const Texture *); - void set_tint(const Color &); + void set_color(const Color &); void set_vertex_color(bool); };