3 This file is part of libmspgl
4 Copyright © 2007-2008 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GL_MATERIAL_H_
9 #define MSP_GL_MATERIAL_H_
11 #include <msp/datafile/objectloader.h>
19 Stores OpenGL material properties. Since OpenGL does not support material
20 objects, application of material is done with several calls to glMaterial.
22 class Material: public Bindable<Material>
25 class Loader: public DataFile::ObjectLoader<Material>
31 void ambient(float, float, float, float);
32 void diffuse(float, float, float, float);
33 void specular(float, float, float, float);
34 void emission(float, float, float, float);
46 void set_ambient(const Color &a);
47 void set_diffuse(const Color &d);
48 void set_specular(const Color &s);
49 void set_emission(const Color &e);
50 void set_shininess(float s);
51 const Color &get_ambient() const { return ambient; }
52 const Color &get_diffuse() const { return diffuse; }
53 const Color &get_specular() const { return specular; }
54 const Color &get_emission() const { return emission; }
55 float get_shininess() const { return shininess; }