1
0
Fork 0

Reset: work with threaded OSG modes

This commit is contained in:
James Turner 2014-03-11 16:45:31 +00:00
parent 64c393d022
commit f04d5f8758

View file

@ -971,13 +971,16 @@ void fgStartNewReset()
}
} // of top-level groups iteration
FGRenderer* render = globals->get_renderer();
// needed or we crash in multi-threaded OSG mode
render->getViewer()->stopThreading();
// order is important here since tile-manager shutdown needs to
// access the scenery object
globals->set_tile_mgr(NULL);
globals->set_scenery(NULL);
flightgear::CameraGroup::setDefault(NULL);
FGRenderer* render = globals->get_renderer();
// don't cancel the pager until after shutdown, since AIModels (and
// potentially others) can queue delete requests on the pager.
render->getViewer()->getDatabasePager()->cancel();
@ -1024,6 +1027,7 @@ void fgStartNewReset()
// must do this before splashinit for Rembrandt
flightgear::CameraGroup::buildDefaultGroup(viewer.get());
render->splashinit();
viewer->startThreading();
fgOSResetProperties();