From Laurens Voerman, "I have implemented and tested (on windows only) your suggestion for resetCullingMask(), it's far less intrusive than my previous submission.

attached are the changes to current svn (28 Jan 2013 / rev :13312).
"
This commit is contained in:
Robert Osfield
2013-01-28 14:30:21 +00:00
parent 0e7ae7319b
commit 45585b78fb
2 changed files with 14 additions and 1 deletions

View File

@@ -109,7 +109,15 @@ class OSG_EXPORT CullStack : public osg::CullSettings
inline bool isCulled(const osg::Node& node)
{
return node.isCullingActive() && getCurrentCullingSet().isCulled(node.getBound());
if (node.isCullingActive())
{
return getCurrentCullingSet().isCulled(node.getBound());
}
else
{
getCurrentCullingSet().resetCullingMask();
return false;
}
}
inline void pushCurrentMask()

View File

@@ -326,6 +326,11 @@ class OSG_EXPORT CullingSet : public Referenced
#endif
}
inline void resetCullingMask()
{
_frustum.setResultMask(_frustum.getCurrentMask());
}
void disableAndPushOccludersCurrentMask(NodePath& nodePath);
void popOccludersCurrentMask(NodePath& nodePath);