mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-17 10:21:11 +00:00
Merge branch '#5509_invisibility_fix' into 'master'
Resolve #5509 where culling did not take invisiblity into accont Closes #5509 See merge request OpenMW/openmw!254
This commit is contained in:
commit
90a0f11c1f
@ -1481,10 +1481,10 @@ namespace MWRender
|
|||||||
void Animation::setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
|
void Animation::setObjectRoot(const std::string &model, bool forceskeleton, bool baseonly, bool isCreature)
|
||||||
{
|
{
|
||||||
osg::ref_ptr<osg::StateSet> previousStateset;
|
osg::ref_ptr<osg::StateSet> previousStateset;
|
||||||
|
osg::ref_ptr<osg::Callback> previousCullCallback;
|
||||||
if (mObjectRoot)
|
if (mObjectRoot)
|
||||||
{
|
{
|
||||||
if (mLightListCallback)
|
previousCullCallback = mObjectRoot->getCullCallback();
|
||||||
mObjectRoot->removeCullCallback(mLightListCallback);
|
|
||||||
previousStateset = mObjectRoot->getStateSet();
|
previousStateset = mObjectRoot->getStateSet();
|
||||||
mObjectRoot->getParent(0)->removeChild(mObjectRoot);
|
mObjectRoot->getParent(0)->removeChild(mObjectRoot);
|
||||||
}
|
}
|
||||||
@ -1573,9 +1573,9 @@ namespace MWRender
|
|||||||
removeTriBipVisitor.remove();
|
removeTriBipVisitor.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!mLightListCallback)
|
if (!previousCullCallback)
|
||||||
mLightListCallback = new SceneUtil::LightListCallback;
|
previousCullCallback = mLightListCallback;
|
||||||
mObjectRoot->addCullCallback(mLightListCallback);
|
mObjectRoot->setCullCallback(previousCullCallback);
|
||||||
}
|
}
|
||||||
|
|
||||||
osg::Group* Animation::getObjectRoot()
|
osg::Group* Animation::getObjectRoot()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user