struct Texture2DBuilder

robot_2Generated
code_blocksInput

Description

The Texture2DBuilder struct in the Sandbox namespace provides a fluent interface for constructing 2D textures with various configurations. It allows you to specify texture properties such as usage, format, size, and more, before finalizing the texture creation.

Members

Instance Methods

Member Name Summary
WithStaticUsage Configures the texture for static usage.
WithSemiStaticUsage Configures the texture for semi-static usage.
WithDynamicUsage Configures the texture for dynamic usage.
WithGPUOnlyUsage Configures the texture for GPU-only usage.
WithUAVBinding Enables UAV binding for the texture.
WithMips Enables mipmaps for the texture.
WithMips(int mips) Specifies the number of mipmaps for the texture.
WithFormat Sets the image format for the texture.
WithScreenFormat Configures the texture with a screen-compatible format.
WithDepthFormat Configures the texture with a depth format.
WithMultiSample2X Enables 2x multisampling for the texture.
WithMultiSample4X Enables 4x multisampling for the texture.
WithMultiSample6X Enables 6x multisampling for the texture.
WithMultiSample8X Enables 8x multisampling for the texture.
WithMultiSample16X Enables 16x multisampling for the texture.
WithScreenMultiSample Configures the texture with screen-compatible multisampling.
WithName Assigns a name to the texture.
WithData Sets the texture data from a byte array.
WithData(byte[] data, int dataLength) Sets the texture data from a byte array with specified length.
WithData(ReadOnlySpan<T> data) Sets the texture data from a read-only span.
WithMultisample Configures the texture with a specified multisample amount.
WithAnonymous Sets the texture as anonymous.
Finish Builds and creates the actual texture.
WithSize(int width, int height) Specifies the size of the texture.
WithSize(Vector2 size) Specifies the size of the texture using a vector.