Description
The WithScreenFormat
method is a member of the Texture3DBuilder
class in the Sandbox namespace. This method configures the Texture3DBuilder
to use a screen-compatible format for the 3D texture being built. This is particularly useful when the texture is intended to be used in scenarios where it needs to be displayed directly on the screen, ensuring compatibility with screen rendering formats.
Usage
To use the WithScreenFormat
method, you should have an instance of Texture3DBuilder
. Call this method on the instance to set the texture format to a screen-compatible format. This method is chainable, meaning you can call other configuration methods on the same instance before finalizing the texture creation with the Finish
method.
Example
// Create a new Texture3DBuilder instance
Texture3DBuilder builder = new Texture3DBuilder();
// Configure the builder to use a screen format
builder.WithScreenFormat();
// Further configuration can be done here
// ...
// Finalize and create the texture
Texture texture = builder.Finish();