X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fmaterial.h;h=f244636859ccc6bb7ab417e5ebe7b498f6925ff5;hb=8aea0f65f9ab7d603e47cf4479388af246cc8400;hp=3a65f339344787512f59597c1483a3596ec4376c;hpb=28e0d3968ae72b0df0e7193a417eb30d1097f734;p=libs%2Fgl.git diff --git a/source/material.h b/source/material.h index 3a65f339..f2446368 100644 --- a/source/material.h +++ b/source/material.h @@ -19,7 +19,7 @@ public: { public: Loader(Material &); - + private: void ambient(float, float, float, float); void diffuse(float, float, float, float); @@ -28,6 +28,15 @@ public: }; private: + enum ParameterMask + { + AMBIENT = 1, + DIFFUSE = 2, + SPECULAR = 4, + EMISSION = 8, + SHININESS = 16 + }; + Color ambient; Color diffuse; Color specular; @@ -36,6 +45,11 @@ private: public: Material(); + +private: + void update_parameter(int) const; + +public: void set_ambient(const Color &a); void set_diffuse(const Color &d); void set_specular(const Color &s);