From 7550a2e19516d7924bcd89356f3f1b0402180e2f Mon Sep 17 00:00:00 2001 From: Evan Goers Date: Sun, 21 Sep 2014 03:30:48 +0000 Subject: Added shininess setting for shaders. --- src/model/material.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/model/material.cc') diff --git a/src/model/material.cc b/src/model/material.cc index d4accc8..3d67cad 100644 --- a/src/model/material.cc +++ b/src/model/material.cc @@ -184,7 +184,7 @@ void Material::load_shaderfile(const std::string &shadername) unsigned int linenumber = 0; char line[1024]; unsigned int count = 0; - float r, g, b, a; + float r, g, b, a, shine; Material *material = 0; Layer *layer = 0; @@ -309,6 +309,10 @@ void Material::load_shaderfile(const std::string &shadername) } layer->set_specular(math::Color(r, g, b, a)); } + } else if (firstword.compare("shininess") == 0) { + if (linestream >> shine) { + layer->set_shininess(shine); + } } else if (firstword.compare("engine") == 0) { layer->set_rgbgen(Layer::RGBGenEngine); } else if (firstword.compare("entity") == 0) { -- cgit v1.2.3