GM_setDriverOptions
Sets driver registration options for the Game Framework
Declaration
void MGLAPI GM_setDriverOptions(
GM_driverOptions *opt)
Prototype In
gm/gm.h
Parameters
opt |
Parameter block containing driver registration options |
Description
This function tells the Game Framework which driver technologies you want to support in your game. By default all of them are enabled, and you can use this function to disable certain driver technologies at runtime for compatibility in the field. You may call this function as many times as you wish to change the driver options on the fly, and if the values change the Game Framework will re-enumerate the list of available graphics modes for you.
Note that the GM_driverOptions structure also contains the modeFlags field which represents the color depths that you will be supporting in your application, so that the Game Framework will only enumerate modes that your game can support. For instance if you only support 8bpp modes, than pass a value of GM_MODE_8BPP. If you support 8bpp and 15/16bpp then pass in a value of GM_MODE_8BPP | GM_MODE_16BPP. Note also that you can change the supported mode flags at any time, which is useful if your software renderer only supports 8bpp modes, while in 3D hardware accelerated modes you want to support all available color depths.
Note: The Game Framework enumerates both 15bpp (5:5:5) and 16bpp (5:6:5) modes when you pass in a value of GM_MODE_16BPP, since both of these modes will likely be available on end user systems. Also note that it is equally likely that in some cases only one of these formats and not the other is supported on the end user system, so your code will have to be able to support both formats for compatibility.
Note: If your game does not require hardware OpenGL support (ie: you are not using OpenGL in your game), then you should set the useOpenGLHW flag to false to make sure that the OpenGL drivers are not registered with the MGL (which would require the OpenGL runtime DLL's to be installed on your end users system).
Note: We recommend that you provide support for disabling both DirectDraw and WinDirect modes via a command line switch in your game, in case either of these two technologies have problems on your customer machines. Please see the Game Framework sample code for ideas on how to do this.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com