Description
The WithDynamicUsage
method is part of the TextureCubeBuilder
class in the Sandbox API. This method configures the texture cube to be used with dynamic usage. Dynamic usage is suitable for textures that are frequently updated, allowing for more efficient data transfer between the CPU and GPU.
Usage
To use the WithDynamicUsage
method, first create an instance of TextureCubeBuilder
. Then, call the WithDynamicUsage
method on this instance to set the texture cube's usage to dynamic. This method returns the same TextureCubeBuilder
instance, allowing for method chaining.
Example
// Example of using WithDynamicUsage
TextureCubeBuilder builder = new TextureCubeBuilder();
builder.WithDynamicUsage();
// Continue configuring the builder
builder.WithSize(256, 256)
.WithFormat(ImageFormat.RGBA8)
.Finish();