Add catch for when shadows are enabled between the update and draw traversals.
This commit is contained in:
@@ -583,6 +583,13 @@ void ViewDependentShadowMap::cull(osgUtil::CullVisitor& cv)
|
|||||||
{
|
{
|
||||||
OSG_INFO<<std::endl<<std::endl<<"ViewDependentShadowMap::cull(osg::CullVisitor&"<<&cv<<")"<<std::endl;
|
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);
|
ViewDependentData* vdd = getViewDependentData(&cv);
|
||||||
|
|
||||||
if (!vdd)
|
if (!vdd)
|
||||||
|
|||||||
Reference in New Issue
Block a user