diff options
Diffstat (limited to 'src/render/state.cc')
-rw-r--r-- | src/render/state.cc | 8 |
1 files changed, 3 insertions, 5 deletions
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)); } |