RwShowCameraImage(RwCamera *camera, void *param);
Description
Copies the damaged regions of the cameras image buffer to the portion of the display (screen or window) specified by the cameras viewport.
Arguments
camera Pointer to the camera.
param Device dependent parameter.
Return Value
The argument camera if successful, and NULL otherwise.
Comments
For a description of the device dependent parameter, param, see Appendix B.
This function often immediately follows an RwBeginCameraUpdate() RwEndCameraUpdate() block in order to copy the rendering performed within the RwBeginCameraUpdate() RwEndCameraUpdate() block to the display.
Note that the cameras image buffer is not automatically cleared after the call to RwShowCameraImage(). To clear the image buffer, call RwClearCameraViewport().
If a number of separate cameras are being used to provide different images simultaneously, it is advisable to do the RwBeginCameraUpdate() RwEndCameraUpdate()block for each camera first, then perform all the calls to RwShowCameraImage()afterwards.
When camera is a camera created with a user raster, param should be the address of a callback function which will display rectangular areas that have changed in the camera:
The prototype for this callback is defined in rwtypes.h as follows:
typedef void (RWCALLBACK * RwCameraShowCallBack)(RwCamera *camera, RwRect *rect);
It is an error to pass a NULL callback address for a user raster camera
Example
void
RWCALLBACK
DispUserRaster(RwCamera *camera, RwRect *rect)
{
/* Display rectangle in camera at (rect.x, rect.y) of size (rect.w, rect.h). */
}
invoked with:
RwShowCameraImage(camera, (void *)DispUserRaster);
See Also