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.
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.
Member Name | Summary |
---|---|
WithStaticUsage | Provides a hint to the GPU that this texture will not be modified. |
WithSemiStaticUsage | Provides a hint to the GPU that this texture will only be updated sometimes. |
WithDynamicUsage | Provides a hint to the GPU that this texture will be updated regularly (almost every frame). |
WithGPUOnlyUsage | Specify the texture to ONLY be used on the GPU and not allow CPU access. |
WithSize | Sets the size of the texture using width and height. |
WithWidth | Sets the width of the texture. |
WithHeight | Sets the height of the texture. |
WithDepth | Sets the depth of the texture. |
WithMSAA | Sets the multisample anti-aliasing (MSAA) level for the texture. |
WithMultiSample2X | Sets the texture to use 2x multisampling. |
WithMultiSample4X | Sets the texture to use 4x multisampling. |
WithMultiSample6X | Sets the texture to use 6x multisampling. |
WithMultiSample8X | Sets the texture to use 8x multisampling. |
WithMultiSample16X | Sets the texture to use 16x multisampling. |
WithScreenMultiSample | Sets the texture to use the same multisampling as the screen/framebuffer. |
WithFormat | Sets the format of the texture. |
WithScreenFormat | Sets the internal texture format to use the same format as the screen/frame buffer. |
WithDepthFormat | Uses the same depth format as the screen/framebuffer. |
WithMips | Sets the number of mipmap levels for the texture. |
WithUAVBinding | Enables or disables UAV (Unordered Access View) binding for the texture. |
Create | Creates the texture with the specified parameters. |