Implemented ViewDependentShadowMap::setDebugDraw(bool) to allow osgshadow to enable/disable the debug display via the

standard --debugHUD option.
This commit is contained in:
Robert Osfield
2011-08-09 15:57:37 +00:00
parent c14516d5f6
commit 675a61ea87
3 changed files with 54 additions and 32 deletions

View File

@@ -814,6 +814,7 @@ int main(int argc, char** argv)
else if( arguments.read("--vdsm") )
{
osg::ref_ptr<osgShadow::ViewDependentShadowMap> vdsm = new osgShadow::ViewDependentShadowMap;
while( arguments.read("--debugHUD") ) vdsm->setDebugDraw( true );
shadowedScene->setShadowTechnique(vdsm.get());
}
else /* if (arguments.read("--sm")) */
@@ -829,8 +830,7 @@ int main(int argc, char** argv)
if( msm )// Set common MSM & LISPSM arguments
{
shadowedScene->setShadowTechnique( msm.get() );
while( arguments.read("--debugHUD") )
msm->setDebugDraw( true );
while( arguments.read("--debugHUD") ) msm->setDebugDraw( true );
float minLightMargin = 10.f;
float maxFarPlane = 0;