Commit 4f3009d1 authored by Martin Heistermann's avatar Martin Heistermann

cell rendering: provide normals where necessary to avoid rendering errors

parent eab2727f
...@@ -352,7 +352,9 @@ void VolumeMeshBufferManager<VolumeMesh>::setOptionsFromDrawMode(ACG::SceneGraph ...@@ -352,7 +352,9 @@ void VolumeMeshBufferManager<VolumeMesh>::setOptionsFromDrawMode(ACG::SceneGraph
else if (_drawMode & (mDrawModes.facesFlatShaded | mDrawModes.facesTexturedShaded | mDrawModes.facesColoredPerFaceFlatShaded)) else if (_drawMode & (mDrawModes.facesFlatShaded | mDrawModes.facesTexturedShaded | mDrawModes.facesColoredPerFaceFlatShaded))
enablePerFaceNormals(); enablePerFaceNormals();
else if (_drawMode & (mDrawModes.cellsSmoothShaded | mDrawModes.facesSmoothShaded | mDrawModes.halffacesSmoothShaded | else if (_drawMode & (mDrawModes.cellsSmoothShaded | mDrawModes.facesSmoothShaded | mDrawModes.halffacesSmoothShaded |
mDrawModes.cellsPhongShaded | mDrawModes.facesPhongShaded | mDrawModes.halffacesPhongShaded)) mDrawModes.cellsPhongShaded | mDrawModes.facesPhongShaded | mDrawModes.halffacesPhongShaded |
mDrawModes.cellsColoredPerCell | mDrawModes.cellsColoredPerFace | mDrawModes.cellsColoredPerHalfface |
mDrawModes.cellsColoredPerVertex | mDrawModes.cellsTransparent))
enablePerVertexNormals(); enablePerVertexNormals();
else else
disableNormals(); disableNormals();
......
...@@ -757,7 +757,7 @@ void VolumeMeshNodeT<VolumeMeshT>::getCellRenderObjects(IRenderer* _renderer, GL ...@@ -757,7 +757,7 @@ void VolumeMeshNodeT<VolumeMeshT>::getCellRenderObjects(IRenderer* _renderer, GL
ro.shaderDesc.clearTextures(); ro.shaderDesc.clearTextures();
ro.shaderDesc.shadeMode = SG_SHADE_GOURAUD; ro.shaderDesc.shadeMode = SG_SHADE_UNLIT;
ro.depthRange = Vec2f(0.01f, 1.0f); ro.depthRange = Vec2f(0.01f, 1.0f);
......
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