Merge pull request #702 from mp3butcher/fix36

add MeshReindexation flag
This commit is contained in:
OpenSceneGraph git repository
2019-01-26 18:21:47 +00:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@@ -262,7 +262,7 @@ void IndexMeshVisitor::makeMesh(Geometry& geom)
}
// nothing to index
if (!numSurfacePrimitives || !numNonIndexedPrimitives) return;
if (!numSurfacePrimitives || (!_generateNewIndicesOnAllGeometries && !numNonIndexedPrimitives)) return;
// duplicate shared arrays as it isn't safe to rearrange vertices when arrays are shared.
if (geom.containsSharedArrays()) geom.duplicateSharedArrays();