3 This file is part of libmspgl
4 Copyright © 2007 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/loader.h>
18 Stores OpenGL material properties. Since OpenGL does not support material
19 objects, application of material is done with several calls to glMaterial.
24 class Loader: public DataFile::Loader
31 Material &get_object() const { return mat; }
34 void ambient(float, float, float, float);
35 void diffuse(float, float, float, float);
36 void specular(float, float, float, float);
37 void emission(float, float, float, float);
49 void set_ambient(const Color &a);
50 void set_diffuse(const Color &d);
51 void set_specular(const Color &s);
52 void set_emission(const Color &e);
53 void set_shininess(float s);
54 const Color &get_ambient() const { return ambient; }
55 const Color &get_diffuse() const { return diffuse; }
56 const Color &get_specular() const { return specular; }
57 const Color &get_emission() const { return emission; }
58 float get_shininess() const { return shininess; }