RenderTargetHandle TransferRenderTarget( RenderTargetHandle handle, CommandList targetCommandList )

robot_2Generated
code_blocksInput

Description

The TransferRenderTarget method is used to transfer a render target from one command list to another. This is useful when you need to pass rendering data between different stages or contexts within the rendering pipeline.

Usage

To use the TransferRenderTarget method, you need to have a source RenderTargetHandle and a target CommandList. The method will return a new RenderTargetHandle that represents the transferred render target in the target command list.

Example

// Example usage of TransferRenderTarget
var sourceHandle = new RenderTargetHandle();
var targetCommandList = new CommandList();

// Transfer the render target from the current command list to the target command list
RenderTargetHandle transferredHandle = currentCommandList.TransferRenderTarget(sourceHandle, targetCommandList);

// Now, transferredHandle can be used with the targetCommandList