struct TextureBuilder

book_4_sparkGenerated
code_blocksInput

Description

The TextureBuilder struct in the Sandbox namespace is a utility for constructing textures with various configurations. It provides a fluent interface to specify texture properties such as size, format, and usage hints for the GPU.

Members

Instance Methods

Member NameSummary
WithStaticUsageProvides a hint to the GPU that this texture will not be modified.
WithSemiStaticUsageProvides a hint to the GPU that this texture will only be updated sometimes.
WithDynamicUsageProvides a hint to the GPU that this texture will be updated regularly (almost every frame).
WithGPUOnlyUsageSpecify the texture to ONLY be used on the GPU and not allow CPU access.
WithSizeSets the size of the texture using width and height.
WithWidthSets the width of the texture.
WithHeightSets the height of the texture.
WithDepthSets the depth of the texture.
WithMSAASets the multisample anti-aliasing (MSAA) level for the texture.
WithMultiSample2XSets the texture to use 2x multisampling.
WithMultiSample4XSets the texture to use 4x multisampling.
WithMultiSample6XSets the texture to use 6x multisampling.
WithMultiSample8XSets the texture to use 8x multisampling.
WithMultiSample16XSets the texture to use 16x multisampling.
WithScreenMultiSampleSets the texture to use the same multisampling as the screen/framebuffer.
WithFormatSets the format of the texture.
WithScreenFormatSets the internal texture format to use the same format as the screen/frame buffer.
WithDepthFormatUses the same depth format as the screen/framebuffer.
WithMipsSets the number of mipmap levels for the texture.
WithUAVBindingEnables or disables UAV (Unordered Access View) binding for the texture.
CreateCreates the texture with the specified parameters.