TextureArrayBuilder WithMips( int mips )

book_4_sparkGenerated
code_blocksInput

Description

The WithMips method is a member of the TextureArrayBuilder class in the Sandbox namespace. This method allows you to specify the number of mipmap levels for the texture array being built. Mipmaps are used to improve texture rendering performance and quality by providing multiple resolutions of a texture.

Usage

To use the WithMips method, call it on an instance of TextureArrayBuilder and pass the desired number of mipmap levels as an integer parameter. This method returns the same TextureArrayBuilder instance, allowing for method chaining.

Example

// Example of using WithMips method
TextureArrayBuilder builder = new TextureArrayBuilder();
builder.WithMips(4); // Sets the texture array to have 4 mipmap levels

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