DarkBASIC Professional Help File

DX11 GET CAMERA RENDER TARGET

Retrieves the render target for the given camera.
A render target index can be provided if the camera has more than one render targets.
Note that you will have to delete the returned image when you are done with it; it will not be automatically deleted when the camera is.
Also note that you cannot obtain the render target of the main camera (the backbuffer) using this function.

Syntax

    Return Dword = DX11 GET CAMERA RENDER TARGET(camera, [id])

Parameters

    camera

> Dword
> The camera to get the render target of. Cannot be the main camera.

    [Optional] id

> Dword
> The render target index to retrieve for the camera. Valid range [0..7] on DX11 hardware; only stage 0 is valid in DX10 compatibility mode. Defaults to 0 if not set.

Returns

The image that the camera renders to at the specified slot, or 0 if no such render target exists.

See also

CAMERA Functions Menu
DX11 Function Categories