Table of Contents

Struct DescriptorSet

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

Represents a set of Descriptors (such as Textures or Buffers) that can be bound together to a graphics pipeline.

public readonly struct DescriptorSet
Inherited Members
Extension Methods

Properties

IsValid

Gets a value indicating whether this Descriptor Set is valid (i.e. it has been allocated and has a valid start offset).

public bool IsValid { get; }

Property Value

bool

Methods

New(GraphicsDevice, DescriptorPool, DescriptorSetLayout)

Creates a new Descriptor Set.

public static DescriptorSet New(GraphicsDevice graphicsDevice, DescriptorPool pool, DescriptorSetLayout layout)

Parameters

graphicsDevice GraphicsDevice

The Graphics Device.

pool DescriptorPool

The pool where Descriptor Sets are allocated.

layout DescriptorSetLayout

A description of the Graphics Resources in the Descriptor Set and their layout.

Returns

DescriptorSet

The new Descriptor Set.

SetConstantBuffer(int, Buffer, int, int)

Sets a Constant Buffer View in the specified slot.

public void SetConstantBuffer(int slot, Buffer buffer, int offset, int size)

Parameters

slot int

The slot index.

buffer Buffer

The Constant Buffer to set.

offset int

The Constant Buffer View start offset.

size int

The Constant Buffer View size.

SetSamplerState(int, SamplerState)

Sets a Sampler State in the specified slot.

public void SetSamplerState(int slot, SamplerState samplerState)

Parameters

slot int

The slot index.

samplerState SamplerState

The Sampler State to set.

SetShaderResourceView(int, GraphicsResource)

Sets a Shader Resource View on a Graphics Resource in the specified slot.

public void SetShaderResourceView(int slot, GraphicsResource shaderResourceView)

Parameters

slot int

The slot index.

shaderResourceView GraphicsResource

The Shader Resource View on a Graphics Resource to set.

SetUnorderedAccessView(int, GraphicsResource)

Sets an Unordered Access View in the specified slot.

public void SetUnorderedAccessView(int slot, GraphicsResource unorderedAccessView)

Parameters

slot int

The slot index.

unorderedAccessView GraphicsResource

The Unordered Access View to set.

SetValue(int, object)

Sets a Descriptor in the specified slot.

public void SetValue(int slot, object value)

Parameters

slot int

The slot index.

value object

The Descriptor to set.