diff --git a/include/osg/Drawable b/include/osg/Drawable index 457ed2f01..6b5e02586 100644 --- a/include/osg/Drawable +++ b/include/osg/Drawable @@ -157,6 +157,8 @@ class OSG_EXPORT Drawable : public Node _boundingSphereComputed = true; } + _boundingSphere.set(_boundingBox.center(), _boundingBox.radius()); + return _boundingBox; } diff --git a/src/osgUtil/CullVisitor.cpp b/src/osgUtil/CullVisitor.cpp index 6535fdeae..764509340 100644 --- a/src/osgUtil/CullVisitor.cpp +++ b/src/osgUtil/CullVisitor.cpp @@ -989,10 +989,7 @@ void CullVisitor::apply(osg::Drawable& drawable) return; } - //else - { - if (getNodePath().back()->isCullingActive() && isCulled(bb)) return; - } + if (!getNodePath().empty() && getNodePath().back()->isCullingActive() && isCulled(bb)) return; if (_computeNearFar && bb.valid())