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 Bindable<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);
39 void set_ambient(const Color &a);
40 void set_diffuse(const Color &d);
41 void set_specular(const Color &s);
42 void set_emission(const Color &e);
43 void set_shininess(float s);
44 const Color &get_ambient() const { return ambient; }
45 const Color &get_diffuse() const { return diffuse; }
46 const Color &get_specular() const { return specular; }
47 const Color &get_emission() const { return emission; }
48 float get_shininess() const { return shininess; }