| DemoGL::Using::Setting up application behaviour from code |
All the blockings of DemoGL functionality are done via DEMOGL_SetVariable. To block a certain feature, simply set the corresponding variable that will flag DemoGL to block a feature to true.
To prevent that the console will be brought up by the user, set DGL_VF_NEVERSHOWCONSOLE to true. To prevent that the FPS counter will be brought up by the user, set DGL_VF_NEVERSHOWFPS to true. To prevent that the debug overlay will be brought up by the user, set DGL_VF_NEVERSHOWDEBUGINFO to true. Because the input prompt is relying on the enabling of the debug overlay, this will automatically block the input prompt as well. To prevent that the user will check the rescaling of textures, set DGL_VF_NEVERRESCALETEXTURES to true.
Other application behaviour than blocking of features is the reaction of DemoGL on the failure of the Init() method of certain effectobjects. When the Init() method of an effectobject returns SYS_NOK, it signals to DemoGL that the was some kind of error. DemoGL can then decide to eliminate the effectobject, ignore the error or quit the application. This behaviour is set by the variable DGL_VF_INITFAILURERESPONSE.
Sometimes it's good to switch off or on VSYNC with the vertical blank of the monitor. Switching it off will result in higher framerates but will introduce tearing when cameramovements are big and fast. Switching it on will result in lower framerates but will give smoother animations. Switching on or off VSYNC is done by setting the variable DGL_VF_VSYNC. Note that some nVidia drivers will ignore this setting.
All DEMOGL_SetVariable calls will have effect immediately when possible.
Last changed on 12-mar-2001
©1999-2001 Solutions Design