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:
@@ -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()
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user