Add catch for when shadows are enabled between the update and draw traversals.

This commit is contained in:
Robert Osfield
2011-10-03 15:57:06 +00:00
parent e8e25e82a9
commit d9dbff18a2

View File

@@ -583,6 +583,13 @@ void ViewDependentShadowMap::cull(osgUtil::CullVisitor& cv)
{
OSG_INFO<<std::endl<<std::endl<<"ViewDependentShadowMap::cull(osg::CullVisitor&"<<&cv<<")"<<std::endl;
if (!_shadowCastingStateSet)
{
OSG_NOTICE<<"Warning, init() has not yet been called so ShadowCastingStateSet has not been setup yet, unable to create shadows."<<std::endl;
_shadowedScene->osg::Group::traverse(cv);
return;
}
ViewDependentData* vdd = getViewDependentData(&cv);
if (!vdd)