Commit f31da634 authored by Sebastian Eichelbaum's avatar Sebastian Eichelbaum

[FIX #297] needed to remove several functions which use per-primitive-binding...

[FIX #297] needed to remove several functions which use per-primitive-binding as this kind of binding is no longer supported in OSG. Several function still use this ... to be continued
parent 8d33adaf
......@@ -162,7 +162,9 @@ void WROIArbitrary::updateGFX()
// ------------------------------------------------
// normals
surfaceGeometry->setNormalArray( m_triMesh->getTriangleNormalArray() );
// FIXME: OSG 3.2 no longer supports binding per primitive. I did not find any evidence that the marching lego Algorithm calculated any
// normals. So the code is disabled.
// surfaceGeometry->setNormalArray( m_triMesh->getTriangleNormalArray() );
// surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE );
// ------------------------------------------------
......
......@@ -199,7 +199,7 @@ WROIBox::WROIBox( WPosition minPos, WPosition maxPos ) :
osg::ref_ptr<osg::Vec3Array> normals = osg::ref_ptr<osg::Vec3Array>( new osg::Vec3Array );
setNormals( normals );
m_surfaceGeometry->setNormalArray( normals );
// m_surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE );
m_surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE );
m_not->set( false );
......
......@@ -413,13 +413,9 @@ void WMIsosurface::renderMesh()
// ------------------------------------------------
// normals
if( m_useMarchingLego->get( true ) )
{
surfaceGeometry->setNormalArray( m_triMesh->getTriangleNormalArray() );
surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_PRIMITIVE );
}
else
if( !m_useMarchingLego->get( true ) )
{
// marching lego does not provide normals on a per-vertex-basis. Since OSG3.2, only normal binding on a per vertex basis is supported.
surfaceGeometry->setNormalArray( m_triMesh->getVertexNormalArray() );
surfaceGeometry->setNormalBinding( osg::Geometry::BIND_PER_VERTEX );
}
......
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