Description
The WithGPUOnlyUsage
method is a configuration option for the TextureCubeBuilder
class. It specifies that the texture being built will be used exclusively on the GPU, without any CPU access. This can optimize performance by reducing the overhead associated with CPU-GPU data transfers.
Usage
To use the WithGPUOnlyUsage
method, call it on an instance of TextureCubeBuilder
during the texture configuration process. This method is typically used in a fluent interface style, allowing for chaining with other configuration methods.
Example
// Example of using WithGPUOnlyUsage in a texture cube building process
TextureCubeBuilder builder = new TextureCubeBuilder();
Texture texture = builder
.WithSize(256, 256)
.WithFormat(ImageFormat.RGBA8)
.WithGPUOnlyUsage()
.Finish();
// The texture is now configured to be used only on the GPU.