Description
The WithStaticUsage
method is part of the TextureCubeBuilder
class in the Sandbox namespace. This method configures the texture cube to use static usage, which is optimal for textures that do not change frequently. This setting is beneficial for performance as it allows the graphics hardware to optimize the texture storage and access patterns.
Usage
To use the WithStaticUsage
method, you need to have an instance of TextureCubeBuilder
. Call this method on the instance to set the texture usage to static. This method returns the same TextureCubeBuilder
instance, allowing for method chaining.
Example
// Example of using WithStaticUsage method
TextureCubeBuilder builder = new TextureCubeBuilder();
builder.WithStaticUsage();
// Continue configuring the texture cube
builder.WithSize(256, 256)
.WithFormat(ImageFormat.RGBA8)
.Finish();