Skip to content

GraphicsAPI reference

Struct Command

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

One validated command, as a backend reads it from Commands.

C#
public readonly struct Command : IEquatable<Command>

Implements

IEquatable<Command>

Constructors

Command(CommandKind, GraphicsResource?, Sampler?, PassDescription, RectI, int, int, int, int, int, ShaderStage, IndexSize, int, int)

One validated command, as a backend reads it from Commands.

C#
public Command(CommandKind Kind, GraphicsResource? Resource = null, Sampler? Sampler = null, PassDescription Pass = default, RectI Rect = default, int Slot = 0, int Count = 0, int First = 0, int BaseVertex = 0, int Instances = 1, ShaderStage Stage = ShaderStage.Vertex, IndexSize IndexSize = IndexSize.Bits16, int PayloadOffset = 0, int PayloadLength = 0)

Parameters

Kind CommandKind

Kind.

Resource GraphicsResource?

Pipeline, texture or buffer, by kind.

Sampler Sampler?

Sampler for SetTexture.

Pass PassDescription

Pass for BeginPass.

Rect RectI

Viewport, scissor or texture region.

Slot int

Texture or uniform slot.

Count int

Vertex or index count.

First int

First vertex, first index, or byte offset.

BaseVertex int

Added to each index.

Instances int

Instance count.

Stage ShaderStage

Uniform stage.

IndexSize IndexSize

Index size.

PayloadOffset int

Offset of the data in the list’s payload.

PayloadLength int

Length of the data.

Properties

BaseVertex

Added to each index.

C#
public int BaseVertex { get; init; }

Property Value

int

Count

Vertex or index count.

C#
public int Count { get; init; }

Property Value

int

First

First vertex, first index, or byte offset.

C#
public int First { get; init; }

Property Value

int

IndexSize

Index size.

C#
public IndexSize IndexSize { get; init; }

Property Value

IndexSize

Instances

Instance count.

C#
public int Instances { get; init; }

Property Value

int

Kind

Kind.

C#
public CommandKind Kind { get; init; }

Property Value

CommandKind

Pass

Pass for BeginPass.

C#
public PassDescription Pass { get; init; }

Property Value

PassDescription

PayloadLength

Length of the data.

C#
public int PayloadLength { get; init; }

Property Value

int

PayloadOffset

Offset of the data in the list’s payload.

C#
public int PayloadOffset { get; init; }

Property Value

int

Rect

Viewport, scissor or texture region.

C#
public RectI Rect { get; init; }

Property Value

RectI

Resource

Pipeline, texture or buffer, by kind.

C#
public GraphicsResource? Resource { get; init; }

Property Value

GraphicsResource?

Sampler

Sampler for SetTexture.

C#
public Sampler? Sampler { get; init; }

Property Value

Sampler?

Slot

Texture or uniform slot.

C#
public int Slot { get; init; }

Property Value

int

Stage

Uniform stage.

C#
public ShaderStage Stage { get; init; }

Property Value

ShaderStage

Methods

Deconstruct(out CommandKind, out GraphicsResource?, out Sampler?, out PassDescription, out RectI, out int, out int, out int, out int, out int, out ShaderStage, out IndexSize, out int, out int)

C#
public void Deconstruct(out CommandKind Kind, out GraphicsResource? Resource, out Sampler? Sampler, out PassDescription Pass, out RectI Rect, out int Slot, out int Count, out int First, out int BaseVertex, out int Instances, out ShaderStage Stage, out IndexSize IndexSize, out int PayloadOffset, out int PayloadLength)

Parameters

Kind CommandKind

Resource GraphicsResource?

Sampler Sampler?

Pass PassDescription

Rect RectI

Slot int

Count int

First int

BaseVertex int

Instances int

Stage ShaderStage

IndexSize IndexSize

PayloadOffset int

PayloadLength int

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(Command)

C#
public bool Equals(Command other)

Parameters

other Command

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(Command, Command)

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

Parameters

left Command

right Command

Returns

bool

operator !=(Command, Command)

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

Parameters

left Command

right Command

Returns

bool