Commit cdd38608 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[FIX #297] needed to remove flat shading from triangle mesh renderer. This...

[FIX #297] needed to remove flat shading from triangle mesh renderer. This does not work anymore with OSG 3.2. as you cannot share normals for multiple vertices anymore.
parent a69920e9
......@@ -162,7 +162,6 @@ void WMTriangleMeshRenderer::properties()
// setup all the properties. See header file for their meaning and purpose.
m_showOutline = m_properties->addProperty( "Outline", "Show all edges of the triangulation as lines.", false, m_propCondition );
m_flatShading = m_properties->addProperty( "Flat", "If showing the triangulation as a surface use flat shading.", false, m_propCondition );
m_mainComponentOnly = m_properties->addProperty( "Main component", "Main component only", false, m_propCondition );
m_showCoordinateSystem = m_properties->addProperty( "Coordinate system", "If enabled, the coordinate system of the mesh will be shown.",
false, m_propCondition );
......@@ -392,17 +391,9 @@ void WMTriangleMeshRenderer::renderMesh( boost::shared_ptr< WTriangleMesh > mesh
{
WItemSelector colorModeSelector = m_colorMode->get( true );
if( colorModeSelector.getItemIndexOfSelected( 0 ) == 0 )
{
// use single color
if( m_flatShading->get( true ) )
{
geometry = wge::convertMeshToOsgGeometryFlat( mesh, m_color->get() );
}
else
{
geometry = wge::convertToOsgGeometry( mesh, m_color->get(), true, true, false );
}
}
else if( colorModeSelector.getItemIndexOfSelected( 0 ) == 1 )
{
// take color from mesh
......
......@@ -263,11 +263,6 @@ private:
*/
WPropBool m_showOutline;
/**
* Toggle rendering surface flat shaded (per triangle normals) instead of Phong shaded.
*/
WPropBool m_flatShading;
/**
* En/Disable display of only the main component (biggest vertices number)
*/
......
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