mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Support NiSwitchNode (feature #4812)
This commit is contained in:
parent
6fd4d016eb
commit
2c38e337ae
4 changed files with 41 additions and 0 deletions
|
@ -807,6 +807,13 @@ void Optimizer::RemoveRedundantNodesVisitor::apply(osg::LOD& lod)
|
|||
traverse(*lod.getChild(i));
|
||||
}
|
||||
|
||||
void Optimizer::RemoveRedundantNodesVisitor::apply(osg::Switch& switchNode)
|
||||
{
|
||||
// We should keep all switch child nodes since they reflect different switch states.
|
||||
for (unsigned int i=0; i<switchNode.getNumChildren(); ++i)
|
||||
traverse(*switchNode.getChild(i));
|
||||
}
|
||||
|
||||
void Optimizer::RemoveRedundantNodesVisitor::apply(osg::Group& group)
|
||||
{
|
||||
if (typeid(group)==typeid(osg::Group) &&
|
||||
|
@ -1862,6 +1869,12 @@ void Optimizer::MergeGroupsVisitor::apply(osg::LOD &lod)
|
|||
traverse(lod);
|
||||
}
|
||||
|
||||
void Optimizer::MergeGroupsVisitor::apply(osg::Switch &switchNode)
|
||||
{
|
||||
// We should keep all switch child nodes since they reflect different switch states.
|
||||
traverse(switchNode);
|
||||
}
|
||||
|
||||
void Optimizer::MergeGroupsVisitor::apply(osg::Group &group)
|
||||
{
|
||||
if (group.getNumChildren() <= 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue