Fixed a globalState setting order in OsgCameraGroup::realize()

This commit is contained in:
Don BURNS
2003-03-19 02:31:22 +00:00
parent 8ed643ca24
commit d241ca763b

View File

@@ -209,21 +209,14 @@ void OsgCameraGroup::realize( ThreadingModel thread_model)
cam->setSceneHandler( sh );
}
if( _global_stateset == NULL && _shvec.size() > 0 )
{
SceneHandlerList::iterator p = _shvec.begin();
_global_stateset = (*p)->getGlobalStateSet();
}
setUpSceneViewsWithData();
/// Make all statesets the same as the first.
if( _global_stateset == NULL && _shvec.size() > 0 )
{
SceneHandlerList::iterator p;
p = _shvec.begin();
_global_stateset = (*p)->getGlobalStateSet();
p++;
for( ; p != _shvec.end(); p++ )
(*p)->setGlobalStateSet( _global_stateset.get() );
}
CameraGroup::realize( thread_model );
_initialized = true;
}