Description
The WithSize
method of the TextureBuilder
class allows you to specify the dimensions of a texture by setting its width and height. This method is part of a fluent interface, enabling you to chain multiple configuration methods together to build a texture with specific properties.
Usage
To use the WithSize
method, call it on an instance of TextureBuilder
and provide the desired width and height as integer parameters. This method returns the same TextureBuilder
instance, allowing for method chaining.
Example
// Example of using the WithSize method
TextureBuilder builder = new TextureBuilder();
builder.WithSize(1024, 768);
// Chaining with other methods
builder.WithSize(512, 512)
.WithFormat(ImageFormat.RGBA8)
.WithDynamicUsage();