User:Callahanp/Flightgear and Simgear Code/From Command Line to Holding Short: Difference between revisions

Jump to navigation Jump to search
m
Line 33: Line 33:
==src/Main/bootstrap.cxx==
==src/Main/bootstrap.cxx==
===int main ( int argc, char **argv )===
===int main ( int argc, char **argv )===
The main purpose of Bootstrap.cxx is to differentiate two distinct ways of starting flightgear: as a standalone [[http://wiki.flightgear.org/FGViewer |Viewer]], or as the full flight simulator. bootstrap.cxx also provides a home for globals.
main() is the first of four stages of initialization in Flightgear. The first stage ends when main() calls fgMainInit(argc, argv)
 
main contains the initial entry point and final exit point for the Flightgear application. It initializes things that have to be done early on and decides if we're starting the full application or just a viewer, then calls fgviewerMain(argc, argv) or fgMainInit(argc, argv). We'll skip the viewer and focus on fgMainInit.
 
The main purpose of Bootstrap.cxx is to differentiate two distinct ways of starting flightgear: as a standalone [[http://wiki.flightgear.org/FGViewer |Viewer]], or as the full flight simulator. bootstrap.cxx also provides a home for globals, some error handling and final cleanup when closing flightgear.


We will follow the full flight simulator path which takes us directly into fgMainInit.
We will follow the full flight simulator path which takes us directly into fgMainInit.
936

edits

Navigation menu