Table of Contents

Class SamplerState

Namespace
Stride.Graphics
Assembly
Stride.Graphics.dll

A graphics object that describes a Sampler State, which determines how to sample Texture data.

public class SamplerState : GraphicsResourceBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
object
SamplerState
Implements
Inherited Members
Extension Methods

Fields

Description

The description of the Sampler State.

public readonly SamplerStateDescription Description

Field Value

SamplerStateDescription

Methods

Destroy()

Disposes the resources associated with the Graphics Resource, removes itself from the GraphicsDevice's resource registry, and transitions to the Destroyed state.

protected override void Destroy()

New(GraphicsDevice, ref readonly SamplerStateDescription, string?)

Creates a new SamplerState.

public static SamplerState New(GraphicsDevice device, ref readonly SamplerStateDescription description, string? name = null)

Parameters

device GraphicsDevice

The GraphicsDevice.

description SamplerStateDescription

A SamplerStateDescription structure describing the Sampler State object to create.

name string

An optional name that can be used to identify the Sampler State.

Returns

SamplerState

A new Sampler State object.

NewFake(SamplerStateDescription)

Creates a new fake SamplerState for serialization.

public static SamplerState NewFake(SamplerStateDescription description)

Parameters

description SamplerStateDescription

A SamplerStateDescription structure describing the Sampler State object to create.

Returns

SamplerState

A new fake Sampler State object.

OnDestroyed(bool)

Called when the GraphicsDevice has been detected to be internally destroyed, or when the Destroy() methad has been called. Raises the Destroyed event.

protected override void OnDestroyed(bool immediately = false)

Parameters

immediately bool

A value indicating whether the resource should be destroyed immediately (true), or if it can be deferred until it's safe to do so (false).

Remarks

This method releases the underlying native resources (Silk.NET.Direct3D11.ID3D11Resource and Silk.NET.Direct3D11.ID3D11DeviceChild).

OnRecreate()

Called when the GraphicsDevice has been recreated.

protected override bool OnRecreate()

Returns

bool

true if resource has transitioned to the Active state.