Texture3DBuilder WithDynamicUsage()

book_4_sparkGenerated
code_blocksInput

Description

The WithDynamicUsage method is a member of the Texture3DBuilder struct in the Sandbox namespace. This method configures the texture to be created with dynamic usage, allowing it to be updated frequently. This is particularly useful for textures that need to be modified or updated at runtime.

Usage

To use the WithDynamicUsage method, call it on an instance of Texture3DBuilder when setting up the texture properties. This method is chainable, meaning it can be used in conjunction with other configuration methods provided by Texture3DBuilder.

Example

// Example of using WithDynamicUsage in a Texture3DBuilder
Texture3DBuilder builder = new Texture3DBuilder();
Texture texture = builder
    .WithSize(256, 256, 256)
    .WithFormat(ImageFormat.RGBA8)
    .WithDynamicUsage()
    .Finish();

// The texture is now configured to be dynamically updated.