RenderTargetHandle GrabFrameTexture( string token, bool withMips )

robot_2Generated
code_blocksInput

Description

The GrabFrameTexture method in the CommandList class is used to capture the current frame's texture. This method returns a RenderTargetHandle which can be used to access the captured texture data.

Usage

To use the GrabFrameTexture method, you need to provide a unique string identifier for the texture and specify whether mipmaps should be generated for the texture.

Parameters:

  • token (System.String): A unique identifier for the texture.
  • withMips (System.Boolean): A boolean value indicating whether mipmaps should be generated for the texture.

Returns: RenderTargetHandle: A handle to the captured frame texture.

Example

// Example of using GrabFrameTexture
var commandList = new CommandList();
string textureToken = "MyFrameTexture";
bool generateMips = true;

RenderTargetHandle frameTextureHandle = commandList.GrabFrameTexture(textureToken, generateMips);

// Use the frameTextureHandle for further operations