TextureBuilderclass

objectTextureBuilder
Namespace
Sandbox
Assembly
Sandbox.Engine
Declaration
public sealed struct Sandbox.TextureBuilder

Methods23

Showing 23 methods

public Sandbox.Texture Create(string name = null, bool anonymous = True, System.ReadOnlySpan`1<byte> data = null, int dataLength = 0)PUBLIC

ParameterTypeDescription
name = nullstring
anonymous = Truebool
data = nullReadOnlySpan<byte>
dataLength = 0int
Returns:Texture

public Sandbox.TextureBuilder WithDepthFormat()PUBLIC

Uses the same depth format as what the screen/framebuffer uses.

Returns:TextureBuilder

public Sandbox.TextureBuilder WithDynamicUsage()PUBLIC

Provides a hint to the GPU that this texture will be updated regularly. (almost every frame)

Returns:TextureBuilder

public Sandbox.TextureBuilder WithGPUOnlyUsage()PUBLIC

Specify the texture to ONLY be used on the GPU on not allow CPU access.

Returns:TextureBuilder

public Sandbox.TextureBuilder WithMips(System.Nullable`1<int> mips = null)PUBLIC

ParameterTypeDescription
mips = nullNullable<int>
Returns:TextureBuilder

public Sandbox.TextureBuilder WithScreenFormat()PUBLIC

Sets the internal texture format to use the same format as the screen/frame buffer.

Returns:TextureBuilder

public Sandbox.TextureBuilder WithScreenMultiSample()PUBLIC

Sets the texture to use the same multisampling as whatever the screen/framebuffer uses

Returns:TextureBuilder

public Sandbox.TextureBuilder WithSemiStaticUsage()PUBLIC

Provides a hint to the GPU that this texture will only be updated sometimes.

Returns:TextureBuilder

public Sandbox.TextureBuilder WithStaticUsage()PUBLIC

Provides a hint to the GPU that this texture will not be modified.

Returns:TextureBuilder

public Sandbox.TextureBuilder WithUAVBinding(bool uav = True)PUBLIC

Support binding the texture as a Unordered Access View in a compute or pixel shader. This is required for binding a texture within a compute shader.

ParameterTypeDescription
uav = Truebool
Returns:TextureBuilder

On this page