mirror of
https://github.com/OpenMW/openmw.git
synced 2025-03-30 18:06:39 +00:00
Resolve #5509 where culling did not take invisiblity into accont
This commit is contained in:
parent
21d4c9fe84
commit
e9126fae54
1 changed files with 5 additions and 5 deletions
|
@ -1481,10 +1481,10 @@ namespace MWRender
|
|||
void Animation::setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
|
||||
{
|
||||
osg::ref_ptr<osg::StateSet> previousStateset;
|
||||
osg::ref_ptr<osg::Callback> previousCullCallback;
|
||||
if (mObjectRoot)
|
||||
{
|
||||
if (mLightListCallback)
|
||||
mObjectRoot->removeCullCallback(mLightListCallback);
|
||||
previousCullCallback = mObjectRoot->getCullCallback();
|
||||
previousStateset = mObjectRoot->getStateSet();
|
||||
mObjectRoot->getParent(0)->removeChild(mObjectRoot);
|
||||
}
|
||||
|
@ -1573,9 +1573,9 @@ namespace MWRender
|
|||
removeTriBipVisitor.remove();
|
||||
}
|
||||
|
||||
if (!mLightListCallback)
|
||||
mLightListCallback = new SceneUtil::LightListCallback;
|
||||
mObjectRoot->addCullCallback(mLightListCallback);
|
||||
if (!previousCullCallback)
|
||||
previousCullCallback = mLightListCallback;
|
||||
mObjectRoot->setCullCallback(previousCullCallback);
|
||||
}
|
||||
|
||||
osg::Group* Animation::getObjectRoot()
|
||||
|
|
Loading…
Reference in a new issue