RenderWare V2.1

Previous Page Index Next Page

RwInt32

RwDeviceControl(RwDeviceAction action, RwInt32 param1, void *param2, RwInt32 size);

Arguments

action Under Windows, RenderWare provides the following device controls actions:

· rwWINSETOUTPUTSIZE

This action is used to control the stretching of a camera’s viewport. param1 is ignored, param2 should be a pointer to an RwWinOutputSize structure and size should be the size of an RwWinOutputSize structure. This control returns TRUE if successful, and FALSE otherwise. For a detailed discussion of the use of this control and bitmap stretching in general see the section "Bitmap Stretching".

· rwWINSETRENDERDEPTH

Forces RenderWare to use a rendering depth. The depth is specified in param1 and can currently only be 8 or 16. Conversion from the rendering depth to the display depth is operating system specific and may not work in some cases. Note that this device control may only be used before a device is started.

· rwWINBACKGROUNDPALETTE

This action is used to control how RenderWare realizes its Windows palette. To make RenderWare realize its palette as a background palette pass a non-zero value for param1. To make RenderWare realize its palette as a foreground palette pass zero for param1. In either case param2 and size are ignored. This control returns TRUE if successful, and FALSE otherwise. See the section "RenderWare and Windows Palettes" for further details.

· rwDDGETPRIMARYSURFACE

Retrieve a direct draw surface handle for the primary surface. This handle must not be released by the application. It will be automatically released by the driver when the camera is destroyed. param1 is ignored, param2 should be a pointer to an LPDIRECTDRAWSURFACE.

· rwDDGETDDHANDLE

Retrieve a direct draw handle for the global direct draw object. This must not be released by the application. It will be automatically released by the driver when the driver is closed. param1 is ignored, param2 should be a pointer to an LPDIRECTDRAW.

Comments

Please note, these control actions are highly device dependent and, as such, may be significantly modified or even dropped from future releases of RenderWare.