[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.2.1 System Configuration

This section describes how the system driver can be configured with the config file. The default values are stored in `CS/data/config/system.cfg', except the list of plug-in modules, for which no default exists.

List of Plug-In Modules

The most important part of the system configuration is the list of plug-in modules to load. A plug-in module is loaded with the following line:
 
System.Plugins.FuncID = PluginName
`System.Plugins.' is obligatory and tells the system to load a plug-in now. The `FuncID' (functionality identifier) defines the purpose the plug-in is used for. For example the functionality identifier `VideoDriver' means that this plug-in is used for graphics output. `VideoDriver' is one of the standardized identifiers; that's why all applications use this identifier to look for the module for graphics output. See below for a list of all standardized identifiers. Note that it is not possible to load more than one module with the same functionality identifier.

Finally, `PluginName' determines which plug-in to load. It is the name of the plug-in under which it is known in the SCF registry. You can see a list of all plug-in modules in `CS/scf.cfg'. The plug-in you load here must be made for the purpose you try to use it for. For example, if you load the sound driver with the `VideoDriver' functionality identifier, the application will not see the module at all and complain that you didn't load a graphics driver.

Note that some modules depend on others. If module A depends on module B, then you must first load B, then A. If you don't do this then module A will usually fail to initialize.

Here is an example of a line from the config file:
 
System.Plugins.VideoDriver = crystalspace.graphics3d.opengl
This line loads the module `crystalspace.graphics3d.opengl' (the OpenGL graphics driver) and assigns it to the functionality identifier `VideoDriver' (graphics output).

Some functionality identifiers are standardized. This is useful whenever one module depends on another one. For example, the engine depends on the video driver. When the engine wants to access the video driver, it has to know the driver's functionality identifier. Currently this identifier is always `VideoDriver'. In the future it will probably be possible to tell the engine which identifier to use, so the standardized identifiers will not be required anymore. The following identifiers are standardized:

VFS
The virtual file system. There is only one possible VFS plug-in, called `crystalspace.kernel.vfs'.

VideoDriver
This loads the graphics driver. Possible values are:
crystalspace.graphics3d.software
Uses the system-specific 2D rasterizer to perform 3D graphics operations on the basis of drawing single pixels.

crystalspace.graphics3d.software.offscreen
This is a variant of the software renderer that renders to a buffer in memory, not to the screen.

crystalspace.graphics3d.opengl
Uses OpenGL for 3D output, and by this takes advantage of hardware acceleration. Requires installed OpenGL run-time libraries.

crystalspace.graphics3d.line
This is a variant of the software renderer.

Other System Driver Options

Apart from the list of plug-in modules, the following keys are recognized by the system driver:

MouseDriver.DoubleClickTime = <number>
This is the maximum of time (given in milliseconds) which may pass between two mouse clicks to recognize a double-click. Default is 300.

MouseDriver.DoubleClickDist = <number>
The maximal distance (given in pixels) that the mouse can move between clicks for double click to occur. Default is 2.

System.Win32.DebugConsole = <yes/no>
Default is yes. @@@ FIXME: What does this option control?

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated using texi2html