+ shininess = s;
+}
+
+void Material::bind() const
+{
+ if(set_current(this))
+ {
+ glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT, &ambient.r);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_DIFFUSE, &diffuse.r);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, &specular.r);
+ glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, &emission.r);
+ glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, shininess);
+ }