1 #ifndef MSP_GL_MATERIAL_H_
2 #define MSP_GL_MATERIAL_H_
4 #include <msp/datafile/objectloader.h>
12 Stores OpenGL material properties. Since OpenGL does not support material
13 objects, application of material is done with several calls to glMaterial.
15 class Material: public BindableWithDefault<Material>
18 class Loader: public DataFile::ObjectLoader<Material>
24 void ambient(float, float, float, float);
25 void diffuse(float, float, float, float);
26 void specular(float, float, float, float);
27 void emission(float, float, float, float);
50 void update_parameter(int) const;
53 void set_ambient(const Color &a);
54 void set_diffuse(const Color &d);
55 void set_specular(const Color &s);
56 void set_emission(const Color &e);
57 void set_shininess(float s);
58 const Color &get_ambient() const { return ambient; }
59 const Color &get_diffuse() const { return diffuse; }
60 const Color &get_specular() const { return specular; }
61 const Color &get_emission() const { return emission; }
62 float get_shininess() const { return shininess; }