Fix for MergeGeometryVsiitor bug. Restructured the processing the merge geometry list to avoid missing geometries that aren't binned along with other geometries.
This commit is contained in:
parent
589905fc38
commit
2946ea0759
@ -1956,12 +1956,13 @@ bool Optimizer::MergeGeometryVisitor::mergeGroup(osg::Group& group)
|
||||
++mitr)
|
||||
{
|
||||
DuplicateList& duplicateList = *mitr;
|
||||
if (duplicateList.size()>1)
|
||||
if (!duplicateList.empty())
|
||||
{
|
||||
osg::ref_ptr<osg::Geometry> lhs = duplicateList.front();
|
||||
DuplicateList::iterator ditr = duplicateList.begin();
|
||||
osg::ref_ptr<osg::Geometry> lhs = *ditr++;
|
||||
group.addChild(lhs.get());
|
||||
|
||||
for(DuplicateList::iterator ditr = duplicateList.begin()+1;
|
||||
for(;
|
||||
ditr != duplicateList.end();
|
||||
++ditr)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user