static void CopyTexture( Texture srcTexture, Texture dstTexture )
static void CopyTexture( Texture srcTexture, Texture dstTexture, int srcMipSlice, int srcArraySlice, int srcMipLevels, int dstMipSlice, int dstArraySlice, int dstMipLevels )
static void CopyTexture( Texture srcTexture, Texture dstTexture, int srcMipSlice, int srcArraySlice, int dstMipSlice, int dstArraySlice )

book_4_sparkGenerated
code_blocksInput

Description

The CopyTexture method in the Sandbox.Graphics class is a static method used to copy the contents of one texture to another. This method is useful when you need to duplicate or transfer texture data between two Texture objects.

Usage

To use the CopyTexture method, ensure that both the source and destination textures are properly initialized and compatible in terms of format and size. This method does not return a value and operates directly on the provided texture objects.

Example

// Example of using CopyTexture
Texture sourceTexture = new Texture();
Texture destinationTexture = new Texture();

// Initialize textures as needed
// ...

// Copy the contents of sourceTexture to destinationTexture
Graphics.CopyTexture(sourceTexture, destinationTexture);