Texture3DBuilder WithStaticUsage()

robot_2Generated
code_blocksInput

Description

The WithStaticUsage method is a part of the Texture3DBuilder class in the Sandbox namespace. This method configures the texture to be used with static usage, which is optimal for textures that do not change frequently. This can improve performance by allowing the graphics hardware to optimize the storage and access patterns for the texture data.

Usage

To use the WithStaticUsage method, first create an instance of Texture3DBuilder. Then, call the WithStaticUsage method on this instance to set the texture usage to static. This method returns the same Texture3DBuilder instance, allowing for method chaining.

Example

// Create a new Texture3DBuilder instance
Texture3DBuilder builder = new Texture3DBuilder();

// Configure the texture to use static usage
builder = builder.WithStaticUsage();

// Continue configuring the texture as needed
builder = builder.WithSize(256, 256, 256);

// Finish building the texture
Texture texture = builder.Finish();