TextureBuilder WithFormat( ImageFormat format )

book_4_sparkGenerated
code_blocksInput

Description

The WithFormat method of the TextureBuilder class allows you to specify the image format for the texture being built. This method is part of a fluent interface, enabling you to chain multiple configuration methods together to customize the texture creation process.

Usage

To use the WithFormat method, call it on an instance of TextureBuilder and pass a value of type ImageFormat that represents the desired format of the texture. This method returns the same TextureBuilder instance, allowing for method chaining.

Example

// Example of using WithFormat method
TextureBuilder builder = new TextureBuilder();
builder.WithFormat(ImageFormat.RGBA8);