Removed the erronous creation of a local ShadowSettings object
This commit is contained in:
parent
42cb311f41
commit
35816e6b25
@ -836,8 +836,9 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
osg::ref_ptr<osgShadow::ShadowedScene> shadowedScene = new osgShadow::ShadowedScene;
|
osg::ref_ptr<osgShadow::ShadowedScene> shadowedScene = new osgShadow::ShadowedScene;
|
||||||
|
|
||||||
shadowedScene->getShadowSettings()->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);
|
osgShadow::ShadowSettings* settings = shadowedScene->getShadowSettings();
|
||||||
shadowedScene->getShadowSettings()->setCastsShadowTraversalMask(CastsShadowTraversalMask);
|
settings->setReceivesShadowTraversalMask(ReceivesShadowTraversalMask);
|
||||||
|
settings->setCastsShadowTraversalMask(CastsShadowTraversalMask);
|
||||||
|
|
||||||
osg::ref_ptr<osgShadow::MinimalShadowMap> msm = NULL;
|
osg::ref_ptr<osgShadow::MinimalShadowMap> msm = NULL;
|
||||||
if (arguments.read("--no-shadows"))
|
if (arguments.read("--no-shadows"))
|
||||||
@ -918,9 +919,6 @@ int main(int argc, char** argv)
|
|||||||
}
|
}
|
||||||
else if( arguments.read("--vdsm") )
|
else if( arguments.read("--vdsm") )
|
||||||
{
|
{
|
||||||
osgShadow::ShadowSettings* settings = new osgShadow::ShadowSettings;
|
|
||||||
shadowedScene->setShadowSettings(settings);
|
|
||||||
|
|
||||||
while( arguments.read("--debugHUD") ) settings->setDebugDraw( true );
|
while( arguments.read("--debugHUD") ) settings->setDebugDraw( true );
|
||||||
if (arguments.read("--persp")) settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::PERSPECTIVE_SHADOW_MAP);
|
if (arguments.read("--persp")) settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::PERSPECTIVE_SHADOW_MAP);
|
||||||
if (arguments.read("--ortho")) settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::ORTHOGRAPHIC_SHADOW_MAP);
|
if (arguments.read("--ortho")) settings->setShadowMapProjectionHint(osgShadow::ShadowSettings::ORTHOGRAPHIC_SHADOW_MAP);
|
||||||
|
Loading…
Reference in New Issue
Block a user