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) bool Optimizer::MergeGroupsVisitor::isOperationPermissible(osg::Group& node)
{ {
return !node.asSwitch() && return !node.getCullCallback() &&
!node.asTransform() &&
!node.getCullCallback() &&
!node.getEventCallback() && !node.getEventCallback() &&
!node.getUpdateCallback() && !node.getUpdateCallback() &&
isOperationPermissibleForObject(&node); isOperationPermissibleForObject(&node) &&
typeid(node)==typeid(osg::Group);
} }
void Optimizer::MergeGroupsVisitor::apply(osg::LOD &lod) void Optimizer::MergeGroupsVisitor::apply(osg::LOD &lod)

Loading…
Cancel
Save