TextureCubeBuilder WithFormat( ImageFormat format )

book_4_sparkGenerated
code_blocksInput

Description

The WithFormat method of the TextureCubeBuilder class allows you to specify the image format for the texture cube being built. This method is part of a fluent interface, enabling you to chain multiple configuration methods together to customize the texture cube before finalizing it with the Finish method.

Usage

To use the WithFormat method, call it on an instance of TextureCubeBuilder and pass the desired ImageFormat as a parameter. This method returns the same TextureCubeBuilder instance, allowing for method chaining.

Example

// Example of using WithFormat method
TextureCubeBuilder builder = new TextureCubeBuilder();
builder.WithFormat(ImageFormat.RGBA8)
       .WithSize(256, 256)
       .WithMips(4);

Texture textureCube = builder.Finish();