static RenderTarget From( Texture color, Texture depth )

book_4_sparkGenerated
code_blocksInput

Description

The RenderTarget.From method creates a new RenderTarget instance using the specified color and depth textures. This method is useful when you have pre-existing textures that you want to use as render targets.

Usage

To use the RenderTarget.From method, provide the color and depth textures as parameters. These textures should be instances of the Texture class.

Example

// Example of using RenderTarget.From
Texture colorTexture = new Texture(); // Assume this is initialized properly
Texture depthTexture = new Texture(); // Assume this is initialized properly

RenderTarget renderTarget = RenderTarget.From(colorTexture, depthTexture);

// Now you can use renderTarget for rendering operations