struct
Texture2DBuilder
public sealed struct Texture2DBuilder Constructors
Texture2DBuilder() Methods
Texture2DBuilder WithStaticUsage() Texture2DBuilder WithSemiStaticUsage() Texture2DBuilder WithDynamicUsage() Texture2DBuilder WithGPUOnlyUsage() Texture2DBuilder WithUAVBinding() Texture2DBuilder WithMips() Texture2DBuilder WithMips(Int32 mips) Texture2DBuilder WithFormat(ImageFormat format) Texture2DBuilder WithScreenFormat() Texture2DBuilder WithDepthFormat() Texture2DBuilder WithMultiSample2X() Texture2DBuilder WithMultiSample4X() Texture2DBuilder WithMultiSample6X() Texture2DBuilder WithMultiSample8X() Texture2DBuilder WithMultiSample16X() Texture2DBuilder WithScreenMultiSample() Texture2DBuilder WithName(String name) Provide a name to identify the texture by
name — Desired texture name Texture2DBuilder WithData(Byte[] data) Texture2DBuilder WithData(Byte[] data, Int32 dataLength) Initialize texture with pre-existing texture data.
data — Texture data. dataLength — How big our texture data is. Texture2DBuilder WithData(ReadOnlySpan<T> data) Texture2DBuilder WithMultisample(MultisampleAmount amount) Use Multi-Sample Anti Aliasing (MSAA) of given sample count.
Texture2DBuilder WithAnonymous(Boolean isAnonymous) Set whether the texture is an anonymous texture or not
isAnonymous — Set if it's anonymous or not Texture Finish() Build and create the actual texture
Texture2DBuilder WithSize(Int32 width, Int32 height) Create texture with a predefined size.
width — Width in pixel. height — Height in pixels. Texture2DBuilder WithSize(Vector2 size) Create texture with a predefined size
size — Width and Height in pixels