Texture3DBuilder WithMips( int mips )

robot_2Generated
code_blocksInput

Description

The WithMips method is part of the Texture3DBuilder class in the Sandbox namespace. This method allows you to specify the number of mipmap levels for a 3D texture being constructed. Mipmaps are used to improve texture rendering performance and quality by providing pre-calculated, optimized versions of a texture at different levels of detail.

Usage

To use the WithMips method, you need to have an instance of Texture3DBuilder. Call this method on the instance, passing the desired number of mipmap levels as an integer parameter. This method returns the same Texture3DBuilder instance, allowing for method chaining.

Example

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

// Set the number of mipmap levels to 4
builder.WithMips(4);

// Continue configuring the texture
builder.WithSize(256, 256, 256)
       .WithFormat(ImageFormat.RGBA8)
       .Finish();