Skip to content

GraphicsAPI reference

Struct DepthState

Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device

Depth test and write. Depth is 0 (near) .. 1 (far); anything but None requires DepthBuffer.

C#
public readonly struct DepthState : IEquatable<DepthState>

Implements

IEquatable<DepthState>

Constructors

DepthState(bool, bool, CompareOp)

Depth test and write. Depth is 0 (near) .. 1 (far); anything but None requires DepthBuffer.

C#
public DepthState(bool Test, bool Write, CompareOp Compare)

Parameters

Test bool

Compare against the depth attachment.

Write bool

Write passing depths.

Compare CompareOp

The comparison when Test is set.

Fields

LessWrite

Test less, write: the usual opaque 3D state.

C#
public static readonly DepthState LessWrite

Field Value

DepthState

None

No depth test, no depth write.

C#
public static readonly DepthState None

Field Value

DepthState

Properties

Compare

The comparison when Test is set.

C#
public CompareOp Compare { get; init; }

Property Value

CompareOp

Test

Compare against the depth attachment.

C#
public bool Test { get; init; }

Property Value

bool

Write

Write passing depths.

C#
public bool Write { get; init; }

Property Value

bool

Methods

Deconstruct(out bool, out bool, out CompareOp)

C#
public void Deconstruct(out bool Test, out bool Write, out CompareOp Compare)

Parameters

Test bool

Write bool

Compare CompareOp

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(DepthState)

C#
public bool Equals(DepthState other)

Parameters

other DepthState

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(DepthState, DepthState)

C#
public static bool operator ==(DepthState left, DepthState right)

Parameters

left DepthState

right DepthState

Returns

bool

operator !=(DepthState, DepthState)

C#
public static bool operator !=(DepthState left, DepthState right)

Parameters

left DepthState

right DepthState

Returns

bool