Removed the erronous creation of a local ShadowSettings object

This commit is contained in:
Robert Osfield 2012-08-03 15:23:44 +00:00
parent 42cb311f41
commit 35816e6b25

View File

@ -836,8 +836,9 @@ int main(int argc, char** argv)
osg::ref_ptr<osgShadow::ShadowedScene> 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<osgShadow::MinimalShadowMap> 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);