[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
csSys
) The system library is the basic module in every Crystal Space application. It contains one main class, the system driver. This driver helps in several ways:
WARNING! The system library has being removed. The information here is outdated!!!
The system driver is explicitly designed to be a superclass for your own system
driver class. In particular, the NextFrame()
and HandleEvent()
methods are generally overridden by most applications.
The system driver class is named `SysSystemDriver'. This class contains all system-specific functions. It is, itself, a subclass of `csSystemDriver', which contains the system-independent stuff.
A typical application would perform the following steps:
System->Initialize()
. This will process the command-line, load
and initialize the plug-in modules and open the main configuration file.
System->Open()
. This will open the plug-in modules. The
exact meaning of this operation is specific to each plug-in. For instance, a
graphics-related module might change the graphics mode; a sound-related module
might enable sound output; and an input-related module might enable keyboard
processing.
Any events triggered by these drivers will be sent to your application via the
HandleEvent()
function. If you override this function, you must still
call the old function.
System->Loop()
. This function will only return when your program
exits the main event loop. Of course you can control when this happens, and
you can restart the loop later, but for most applications exiting the main loop
means exiting the application.
Once you have entered this loop, the system driver will call the
NextFrame()
method every frame. This happens at irregular time steps,
so you should use the GetElapsedTime()
function to see how much time
has passed.
System->Close()
explicitly, as this will be done automatically when
you delete the object.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |