TextureArrayBuilder WithSize( int width, int height )

book_4_sparkGenerated
code_blocksInput

Description

The WithSize method is used to specify the dimensions of the texture array being built. It sets the width and height of the texture array, which are essential parameters for defining the size of each texture in the array.

Usage

To use the WithSize method, call it on an instance of TextureArrayBuilder and provide the desired width and height as integer parameters. This method is part of a fluent interface, allowing you to chain multiple configuration methods together before finalizing the texture array with the Finish method.

Example

// Example of using WithSize method
TextureArrayBuilder builder = new TextureArrayBuilder();
builder.WithSize(1024, 768)
       .WithFormat(ImageFormat.RGBA8)
       .WithCount(10);

Texture textureArray = builder.Finish();
// The texture array is now created with each texture having a size of 1024x768.