Only merge pure osg::Groups in the optimizer

pull/2419/head
Capostrophic 6 years ago
parent ef2a7160fa
commit 6622e36226

@ -1802,12 +1802,11 @@ bool Optimizer::MergeGeometryVisitor::mergePrimitive(osg::DrawElementsUInt& lhs,
bool Optimizer::MergeGroupsVisitor::isOperationPermissible(osg::Group& node)
{
return !node.asSwitch() &&
!node.asTransform() &&
!node.getCullCallback() &&
return !node.getCullCallback() &&
!node.getEventCallback() &&
!node.getUpdateCallback() &&
isOperationPermissibleForObject(&node);
isOperationPermissibleForObject(&node) &&
typeid(node)==typeid(osg::Group);
}
void Optimizer::MergeGroupsVisitor::apply(osg::LOD &lod)

Loading…
Cancel
Save