Description
The WithMips
method is part of the TextureCubeBuilder
class in the Sandbox namespace. This method allows you to specify the number of mipmap levels for a texture cube being constructed. Mipmaps are used to create multiple levels of detail for a texture, which can improve rendering performance and visual quality when textures are viewed at a distance or at smaller sizes.
Usage
To use the WithMips
method, call it on an instance of TextureCubeBuilder
and pass the desired number of mipmap levels as an integer parameter. This method returns the TextureCubeBuilder
instance, allowing for method chaining.
Example
// Example of using WithMips method
TextureCubeBuilder builder = new TextureCubeBuilder();
builder.WithMips(4); // Set the texture to have 4 mipmap levels
// Continue building the texture
Texture texture = builder.Finish();