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/render/state.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'src/render/state.cc') diff --git a/src/render/state.cc b/src/render/state.cc index 6f791b3..8ada29c 100644 --- a/src/render/state.cc +++ b/src/render/state.cc @@ -234,7 +234,8 @@ void State::use_material_layer(const model::Material * material, const model::La } math::Color color(layer->color()); - math::Color specular(layer->color()); + math::Color specular(layer->specular()); + math::Color shine(layer->shininess()); // apply color generation rules switch (layer->rgbgen()) { @@ -283,6 +284,7 @@ void State::use_material_layer(const model::Material * material, const model::La gl::color(color); gl::specular(specular); + gl::shininess(shine); // lighted or fullbright if (state_power && layer->fullbright()) { @@ -328,7 +330,6 @@ void State::use_material_layer(const model::Material * material, const model::La } else { color.assign(0.0f, 0.0f, 0.0f); } - gl::material(GL_FRONT, GL_SHININESS, 4); } @@ -361,9 +362,6 @@ void State::reset() gl::disable(GL_TEXTURE_CUBE_MAP); gl::disable(GL_TEXTURE_2D); - // default specular shininess setting - gl::material(GL_FRONT, GL_SHININESS, 8); - gl::color(math::Color(1.0f)); gl::specular(math::Color(0.0f)); } -- cgit v1.2.3