X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Fmaterials%2Fmaterial.h;h=75ff972cd4e1312de7e6d63a74480bf3c3b0409a;hb=ae423e6ef278388f92802fbae34b1c7ec339292f;hp=ff7f53c0d3ffdb23acf15f55c649f6aacaa1708d;hpb=26b3d7bb741bf27468bfad7224a3d06a72579a68;p=libs%2Fgl.git diff --git a/source/materials/material.h b/source/materials/material.h index ff7f53c0..75ff972c 100644 --- a/source/materials/material.h +++ b/source/materials/material.h @@ -27,6 +27,7 @@ private: virtual void init_actions(); private: + void alpha_cutoff(float); void sampler(const std::string &); }; @@ -72,9 +73,10 @@ public: protected: const Sampler *sampler = 0; + float alpha_cutoff = 0.0f; ProgramData shdata; - Material() = default; + Material(); public: virtual ~Material() = default; @@ -96,6 +98,9 @@ public: virtual const Texture *get_texture(Tag) const = 0; virtual const Sampler *get_sampler(Tag) const { return sampler; } + void set_alpha_cutoff(float a); + float get_alpha_cutoff() const { return alpha_cutoff; } + void set_debug_name(const std::string &); template