Description
The WithSemiStaticUsage
method is part of the TextureArrayBuilder
class in the Sandbox namespace. This method configures the texture array to use a semi-static usage pattern. Semi-static usage is typically used for textures that are updated infrequently but still require some level of dynamic updates. This method is useful when you need a balance between static and dynamic usage, allowing for occasional updates without the overhead of fully dynamic textures.
Usage
To use the WithSemiStaticUsage
method, you need to have an instance of TextureArrayBuilder
. Call this method on the instance to set the usage pattern to semi-static. This method returns the same TextureArrayBuilder
instance, allowing for method chaining.
Example
// Example of using WithSemiStaticUsage
TextureArrayBuilder builder = new TextureArrayBuilder();
builder.WithSize(1024, 1024)
.WithFormat(ImageFormat.RGBA8)
.WithSemiStaticUsage();
Texture texture = builder.Finish();
// The texture is now configured with semi-static usage.