Merge pull request #1358 from sacereda/optimizeMeshes

Low performance in OptimizeMeshesProcess with huge number of meshes
pull/1364/head
Alexander Gessler 2017-07-23 01:55:40 +02:00 committed by GitHub
commit ae9755286a
1 changed files with 1 additions and 4 deletions

View File

@ -181,11 +181,8 @@ void OptimizeMeshesProcess::ProcessNode( aiNode* pNode)
verts += mScene->mMeshes[am]->mNumVertices;
faces += mScene->mMeshes[am]->mNumFaces;
pNode->mMeshes[a] = pNode->mMeshes[pNode->mNumMeshes - 1];
--pNode->mNumMeshes;
for( unsigned int n = a; n < pNode->mNumMeshes; ++n ) {
pNode->mMeshes[ n ] = pNode->mMeshes[ n + 1 ];
}
--a;
}
}