struct Texture2DBuilder

book_4_sparkGenerated
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 NameSummary
WithStaticUsageConfigures the texture for static usage.
WithSemiStaticUsageConfigures the texture for semi-static usage.
WithDynamicUsageConfigures the texture for dynamic usage.
WithGPUOnlyUsageConfigures the texture for GPU-only usage.
WithUAVBindingEnables UAV binding for the texture.
WithMipsEnables mipmaps for the texture.
WithMips(Int32)Specifies the number of mipmaps for the texture.
WithFormatSets the image format for the texture.
WithScreenFormatConfigures the texture with a screen-compatible format.
WithDepthFormatConfigures the texture with a depth format.
WithMultiSample2XEnables 2x multisampling for the texture.
WithMultiSample4XEnables 4x multisampling for the texture.
WithMultiSample6XEnables 6x multisampling for the texture.
WithMultiSample8XEnables 8x multisampling for the texture.
WithMultiSample16XEnables 16x multisampling for the texture.
WithScreenMultiSampleConfigures the texture with screen-compatible multisampling.
WithNameAssigns a name to the texture.
WithData(Byte[])Sets the texture data from a byte array.
WithData(Byte[], Int32)Sets the texture data from a byte array with a specified length.
WithData(ReadOnlySpan<T>)Sets the texture data from a read-only span.
WithMultisampleConfigures the texture with a specified multisample amount.
WithAnonymousSets the texture as anonymous.
FinishBuilds and creates the actual texture.
WithSize(Int32, Int32)Specifies the width and height of the texture.
WithSize(Vector2)Specifies the size of the texture using a vector.