Description
The WithGPUOnlyUsage
method is part of the TextureArrayBuilder
class in the Sandbox namespace. This method configures the texture array to be used exclusively on the GPU, optimizing it for scenarios where the texture data does not need to be accessed or modified by the CPU after its initial creation.
Usage
To use the WithGPUOnlyUsage
method, call it on an instance of TextureArrayBuilder
during the texture array configuration process. This method is typically used in a fluent interface style, allowing for method chaining to configure various aspects of the texture array before finalizing it with the Finish
method.
Example
// Example of using WithGPUOnlyUsage in a texture array configuration
TextureArrayBuilder builder = new TextureArrayBuilder();
Texture texture = builder
.WithSize(1024, 1024)
.WithFormat(ImageFormat.RGBA8)
.WithGPUOnlyUsage()
.Finish();
// The texture is now configured to be used only on the GPU.