TextureBuilder WithScreenMultiSample()

book_4_sparkGenerated
code_blocksInput

Description

The WithScreenMultiSample method configures the texture to use the same multisampling settings as the screen or framebuffer. This is useful when you want the texture to match the display's multisampling configuration, ensuring consistency in rendering quality and performance.

Usage

To use the WithScreenMultiSample method, call it on an instance of TextureBuilder when setting up a texture. This method is part of a fluent interface, allowing you to chain multiple configuration methods together.

Example

// Example of using WithScreenMultiSample
TextureBuilder textureBuilder = new TextureBuilder();
textureBuilder.WithScreenMultiSample();

// Continue configuring the texture as needed
textureBuilder.WithSize(1024, 768);

// Create the texture
Texture texture = textureBuilder.Create("MyTexture", false, data, data.Length);