Texture2DBuilder WithFormat( ImageFormat format )

book_4_sparkGenerated
code_blocksInput

Description

The WithFormat method is part of the Texture2DBuilder class in the Sandbox namespace. This method allows you to specify the image format for the texture being built. By calling this method, you can set the desired format of the texture, which determines how the texture data is stored and interpreted.

Usage

To use the WithFormat method, you need to have an instance of Texture2DBuilder. Call the method with a parameter of type ImageFormat to set the format of the texture. This method returns the Texture2DBuilder instance, allowing for method chaining.

Example

// Example of using WithFormat method
Texture2DBuilder builder = new Texture2DBuilder();
builder.WithFormat(ImageFormat.RGBA32);
Texture texture = builder.Finish();