Description
The WithSize
method of the Texture2DBuilder
class allows you to specify the dimensions of the texture being built. This method is part of a fluent interface, enabling method chaining to configure various properties of a texture before finalizing it with the Finish
method.
Usage
To use the WithSize
method, call it on an instance of Texture2DBuilder
and provide the desired width and height as integer parameters. This method returns the same Texture2DBuilder
instance, allowing for further configuration.
Example
// Example of using WithSize method
Texture2DBuilder builder = new Texture2DBuilder();
builder.WithSize(1024, 768)
.WithFormat(ImageFormat.RGBA8)
.WithMips()
.Finish();