1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-22 21:40:42 +00:00

quadtreeworld.cpp (#3174)

Currently, we disable a paging root node that we only need in exterior cells by setting its node mask to 0 when transitioning into an interior cell. Node masks are not ideal for this usage case because Node::getBound is unaware of masks. With this PR we just detach the unused node from the scene graph. _shadowedScene->getBound() in the MWShadowTechnique should return a much better value in interior cells with these changes.
This commit is contained in:
Bo Svensson 2021-10-16 19:48:13 +00:00 committed by GitHub
parent c051298848
commit 01605433cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -498,9 +498,8 @@ void QuadTreeWorld::enable(bool enabled)
if (!mRootNode->getNumParents())
mTerrainRoot->addChild(mRootNode);
}
if (mRootNode)
mRootNode->setNodeMask(enabled ? ~0 : 0);
else if (mRootNode)
mTerrainRoot->removeChild(mRootNode);
}
View* QuadTreeWorld::createView()