diff --git a/src/osgShadow/OccluderGeometry.cpp b/src/osgShadow/OccluderGeometry.cpp index 178e17041..4189f0f12 100644 --- a/src/osgShadow/OccluderGeometry.cpp +++ b/src/osgShadow/OccluderGeometry.cpp @@ -77,22 +77,13 @@ public: if (transform.getStateSet()) popState(); } - void apply(osg::Geode& geode) + void apply(osg::Drawable& drawable) { - if (geode.getStateSet()) pushState(geode.getStateSet()); + if (drawable.getStateSet()) pushState(drawable.getStateSet()); - for(unsigned int i=0; igetStateSet()) pushState(drawable->getStateSet()); - - apply(geode.getDrawable(i)); - - if (drawable->getStateSet()) popState(); - } - - if (geode.getStateSet()) popState(); + if (drawable.getStateSet()) popState(); } void pushState(osg::StateSet* stateset) diff --git a/src/osgShadow/ViewDependentShadowMap.cpp b/src/osgShadow/ViewDependentShadowMap.cpp index 6336662aa..f72f2ce15 100644 --- a/src/osgShadow/ViewDependentShadowMap.cpp +++ b/src/osgShadow/ViewDependentShadowMap.cpp @@ -274,20 +274,14 @@ public: popCurrentMask(); } - void apply(osg::Geode& node) + void apply(osg::Drawable& drawable) { - if (isCulled(node)) return; + if (isCulled(drawable)) return; // push the culling mode. pushCurrentMask(); - for(unsigned int i=0; igetBoundingBox()); - } - } + updateBound(drawable.getBoundingBox()); // pop the culling mode. popCurrentMask();