Reset & re-init
Jump to navigation
Jump to search
| Portability & Compatibility |
|---|
| Performance |
| Efforts |
- See also Initializing Nasal early, Aircraft Center and FGCanvas.
FlightGear has a reset feature accessed via "File > Reset", which is useful after your plane crashes.
Implementation
- The init / shutdown code, including FGGlobals, needs to be adjusted to do the actual deletion and run init again. Most of the other init steps (configuration options) are already re-factored in this direction anyway.
- Any subsystems which should be retained, such as tile-manager or renderer, need to be checked very carefully.
- This likely requires some new SGSubsystemGroup hooks to extract the subsystems from their owning groups so they escape shutdown and deletion.
- Any systems with other threads need to be inerted during the reset. In particular any osgDB paged loaders, or TerraSync threads, need to be paused or audited for safety. TerraSync should be relatively simple (since it's a regular subsystem), osgDB interactions, especially with properties, will be harder.
- All animations and effects will need to be destroyed for sure, since they have property tree references.