Description
The WithStaticUsage
method is part of the TextureArrayBuilder
class in the Sandbox namespace. This method configures the texture array to use static usage, which is optimal for textures that do not change frequently. Static usage textures are typically stored in GPU memory and are not intended to be updated often, making them ideal for textures that remain constant throughout the application's lifecycle.
Usage
To use the WithStaticUsage
method, you need to have an instance of TextureArrayBuilder
. Call this method on the instance to set the usage type to static. This method returns the same TextureArrayBuilder
instance, allowing for method chaining.
Example
// Example of using WithStaticUsage
TextureArrayBuilder builder = new TextureArrayBuilder();
builder.WithStaticUsage();
// Continue configuring the builder
builder.WithSize(1024, 1024)
.WithFormat(ImageFormat.RGBA8)
.Finish();