1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-19 23:53:52 +00:00

Merge pull request #2419 from Capostrophic/lod

Optimizer: Only merge pure osg::Groups
This commit is contained in:
Andrei Kortunov 2019-06-12 18:33:07 +04:00 committed by GitHub
commit b66c437700
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)