Commit 8fc11717 authored by Jan Möbius's avatar Jan Möbius

Disable two sided lighting in volumemesh node.

closes #1702



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17633 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6e2acf3f
......@@ -606,6 +606,10 @@ void VolumeMeshNodeT<VolumeMeshT>::draw(GLState& _state, const DrawModes::DrawMo
glGetBooleanv(GL_TEXTURE_2D, &texturing);
const Vec4f oldColor = _state.color();
// ignore two sided lighting setting and turn it off
GLboolean lightModel = _state.twosided_lighting();
_state.set_twosided_lighting(false);
DrawModes::DrawMode cellDrawMode = drawModes_.getFirstCellDrawMode(_drawMode);
DrawModes::DrawMode faceDrawMode = drawModes_.getFirstFaceDrawMode(_drawMode);
DrawModes::DrawMode edgeDrawMode = drawModes_.getFirstEdgeDrawMode(_drawMode);
......@@ -684,6 +688,8 @@ void VolumeMeshNodeT<VolumeMeshT>::draw(GLState& _state, const DrawModes::DrawMo
ACG::GLState::disable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, texmode);
_state.set_color(oldColor);
_state.set_twosided_lighting(lightModel);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment