Start a new topic

Clean shutdown and restart?

Original Post by: marcher Thu Mar 25 13:16:59 2010

Is there any way to accomplish the following in code:

mgInit(NULL, NULL);


mgInit(NULL, NULL);


It doesn't seem possible to do that currently, but this makes it difficult to write a clean interface to the library that handles initialization and shutdown.

Original Post by: rlopez3d Mon May 16 09:57:40 2011

I am looking also for an answer to the same question.

If mgExit() is called once any later call to mgInit() is not effective. We can't know what really happens because mgInit() has no return value !

My App calls other individual components where OpenFlight API is used, i.e. in each component there is a call to mgInit() and to mgExit().

The problem appears when my App calls a component which uses the OpenFlight API after a first component (also using the OpenFlight API) has been called. The mgInit() call in the second component is not effective after the call to mgExit() has taken place in the first component .

Original Post by: SteveThompson Mon May 16 14:04:12 2011

This is a limitation of the OpenFlight API. You cannot call mgInit more than one time per process. Others have gotten around this limitation by creating a wrapper interface to the API that can be init-ed / exit-ed at will but manages the mgInit and mgExit of the API under the hood.

Sorry about that.

Login to post a comment