RenderWare V2.1

Previous Page Index Next Page

RwCamera *

RwGetCameraViewport(RwCamera *camera, RwInt32 *x, RwInt32 *y,
RwInt32 *width, RwInt32 *height);

Description

Retrieves the camera’s viewport in device space coordinates.

Arguments

camera Pointer to the camera.

x Pointer to the integer that will receive the X coordinate of the top left corner of the viewport (in device space coordinates).

y Pointer to the integer that will receive the Y coordinate of the top left corner of the viewport (in device space coordinates).

width Pointer to the integer that will receive the width of the viewport (in device space units).

height Pointer to the integer that will receive the height of the viewport (in device space units).

Return Value

The argument camera if successful, and NULL otherwise.

Comments

The viewport origin is the top left of the viewport.

For 16-bit applications accessing the RenderWare DLL the variables pointed to by x, y, width and height must be declared as RwInt32s and not ints.

See Also

RwGetCameraViewwindow()

RwResetCamera()

RwSetCameraViewport()

RwSetCameraViewwindow()