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.
public readonly struct Command : IEquatable<Command>Implements
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.
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.
public int BaseVertex { get; init; }Property Value
Count
Vertex or index count.
public int Count { get; init; }Property Value
First
First vertex, first index, or byte offset.
public int First { get; init; }Property Value
IndexSize
Index size.
public IndexSize IndexSize { get; init; }Property Value
Instances
Instance count.
public int Instances { get; init; }Property Value
Kind
Kind.
public CommandKind Kind { get; init; }Property Value
Pass
Pass for BeginPass.
public PassDescription Pass { get; init; }Property Value
PayloadLength
Length of the data.
public int PayloadLength { get; init; }Property Value
PayloadOffset
Offset of the data in the list’s payload.
public int PayloadOffset { get; init; }Property Value
Rect
Viewport, scissor or texture region.
public RectI Rect { get; init; }Property Value
Resource
Pipeline, texture or buffer, by kind.
public GraphicsResource? Resource { get; init; }Property Value
Sampler
Sampler for SetTexture.
public Sampler? Sampler { get; init; }Property Value
Slot
Texture or uniform slot.
public int Slot { get; init; }Property Value
Stage
Uniform stage.
public ShaderStage Stage { get; init; }Property Value
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)
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)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(Command)
public bool Equals(Command other)Parameters
other Command
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(Command, Command)
public static bool operator ==(Command left, Command right)Parameters
left Command
right Command
Returns
operator !=(Command, Command)
public static bool operator !=(Command left, Command right)Parameters
left Command
right Command