forked from mirror/openmw-tes3mp
Merge pull request #377 from OpenMW/master
Add OpenMW commits up to 29 Jan 2018
This commit is contained in:
commit
273a1f50af
2 changed files with 15 additions and 0 deletions
|
@ -800,6 +800,13 @@ bool Optimizer::RemoveRedundantNodesVisitor::isOperationPermissible(osg::Node& n
|
|||
isOperationPermissibleForObject(&node);
|
||||
}
|
||||
|
||||
void Optimizer::RemoveRedundantNodesVisitor::apply(osg::LOD& lod)
|
||||
{
|
||||
// don't remove any direct children of the LOD because they are used to define each LOD level.
|
||||
for (unsigned int i=0; i<lod.getNumChildren(); ++i)
|
||||
traverse(*lod.getChild(i));
|
||||
}
|
||||
|
||||
void Optimizer::RemoveRedundantNodesVisitor::apply(osg::Group& group)
|
||||
{
|
||||
if (typeid(group)==typeid(osg::Group) &&
|
||||
|
@ -1849,6 +1856,12 @@ bool Optimizer::MergeGroupsVisitor::isOperationPermissible(osg::Group& node)
|
|||
isOperationPermissibleForObject(&node);
|
||||
}
|
||||
|
||||
void Optimizer::MergeGroupsVisitor::apply(osg::LOD &lod)
|
||||
{
|
||||
// don't merge the direct children of the LOD because they are used to define each LOD level.
|
||||
traverse(lod);
|
||||
}
|
||||
|
||||
void Optimizer::MergeGroupsVisitor::apply(osg::Group &group)
|
||||
{
|
||||
if (group.getNumChildren() <= 1)
|
||||
|
|
|
@ -339,6 +339,7 @@ class Optimizer
|
|||
|
||||
virtual void apply(osg::Group& group);
|
||||
virtual void apply(osg::Transform& transform);
|
||||
virtual void apply(osg::LOD& lod);
|
||||
|
||||
bool isOperationPermissible(osg::Node& node);
|
||||
|
||||
|
@ -358,6 +359,7 @@ class Optimizer
|
|||
bool isOperationPermissible(osg::Group& node);
|
||||
|
||||
virtual void apply(osg::Group& group);
|
||||
virtual void apply(osg::LOD& lod);
|
||||
};
|
||||
|
||||
class MergeGeometryVisitor : public BaseOptimizerVisitor
|
||||
|
|
Loading…
Reference in a new issue