From 35816e6b25bcfc126884288e3dcce85365965a0b Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 3 Aug 2012 15:23:44 +0000 Subject: [PATCH] Removed the erronous creation of a local ShadowSettings object --- examples/osgshadow/osgshadow.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/examples/osgshadow/osgshadow.cpp b/examples/osgshadow/osgshadow.cpp index 082eb5283..617699b95 100644 --- a/examples/osgshadow/osgshadow.cpp +++ b/examples/osgshadow/osgshadow.cpp @@ -836,8 +836,9 @@ int main(int argc, char** argv) osg::ref_ptr shadowedScene = new osgShadow::ShadowedScene; - shadowedScene->getShadowSettings()->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask); - shadowedScene->getShadowSettings()->setCastsShadowTraversalMask(CastsShadowTraversalMask); + osgShadow::ShadowSettings* settings = shadowedScene->getShadowSettings(); + settings->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask); + settings->setCastsShadowTraversalMask(CastsShadowTraversalMask); osg::ref_ptr msm = NULL; if (arguments.read("--no-shadows")) @@ -918,9 +919,6 @@ int main(int argc, char** argv) } else if( arguments.read("--vdsm") ) { - osgShadow::ShadowSettings* settings = new osgShadow::ShadowSettings; - shadowedScene->setShadowSettings(settings); - while( arguments.read("--debugHUD") ) settings->setDebugDraw( true ); if (arguments.read("--persp")) settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::PERSPECTIVE_SHADOW_MAP); if (arguments.read("--ortho")) settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::ORTHOGRAPHIC_SHADOW_MAP);