Skip to content

GraphicsAPI reference

Struct BatchSettings

Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics

The settings of one batch, from Begin to End.

C#
public readonly struct BatchSettings : IEquatable<BatchSettings>

Implements

IEquatable<BatchSettings>

Constructors

BatchSettings(RenderTarget, Matrix3x2?, BlendState?, SamplerDescription?, SortMode, RectI?, ColorF?, RectI?)

The settings of one batch, from Begin to End.

C#
public BatchSettings(RenderTarget Target, Matrix3x2? View = null, BlendState? Blend = null, SamplerDescription? Sampler = null, SortMode Sort = SortMode.Deferred, RectI? Scissor = null, ColorF? Clear = null, RectI? Viewport = null)

Parameters

Target RenderTarget

Where the batch renders: an offscreen target or the surface target acquired this frame.

View Matrix3x2?

Applied after every draw’s transform (a camera’s WorldToView); null is the identity.

Blend BlendState?

The batch’s blend state; null is AlphaPremultiplied (premultiplied colours).

Sampler SamplerDescription?

The batch’s sampler; null is PointClamp.

Sort SortMode

The order draws reach the device.

Scissor RectI?

The batch’s scissor in target pixels; null draws on the whole target.

Clear ColorF?

A premultiplied colour the target is cleared to first; null keeps its contents.

Viewport RectI?

The viewport in target pixels; null is the whole target.

Properties

Blend

The batch’s blend state; null is AlphaPremultiplied (premultiplied colours).

C#
public BlendState? Blend { get; init; }

Property Value

BlendState?

Clear

A premultiplied colour the target is cleared to first; null keeps its contents.

C#
public ColorF? Clear { get; init; }

Property Value

ColorF?

Sampler

The batch’s sampler; null is PointClamp.

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

Property Value

SamplerDescription?

Scissor

The batch’s scissor in target pixels; null draws on the whole target.

C#
public RectI? Scissor { get; init; }

Property Value

RectI?

Sort

The order draws reach the device.

C#
public SortMode Sort { get; init; }

Property Value

SortMode

Target

Where the batch renders: an offscreen target or the surface target acquired this frame.

C#
public RenderTarget Target { get; init; }

Property Value

RenderTarget

View

Applied after every draw’s transform (a camera’s WorldToView); null is the identity.

C#
public Matrix3x2? View { get; init; }

Property Value

Matrix3x2?

Viewport

The viewport in target pixels; null is the whole target.

C#
public RectI? Viewport { get; init; }

Property Value

RectI?

Methods

Deconstruct(out RenderTarget, out Matrix3x2?, out BlendState?, out SamplerDescription?, out SortMode, out RectI?, out ColorF?, out RectI?)

C#
public void Deconstruct(out RenderTarget Target, out Matrix3x2? View, out BlendState? Blend, out SamplerDescription? Sampler, out SortMode Sort, out RectI? Scissor, out ColorF? Clear, out RectI? Viewport)

Parameters

Target RenderTarget

View Matrix3x2?

Blend BlendState?

Sampler SamplerDescription?

Sort SortMode

Scissor RectI?

Clear ColorF?

Viewport RectI?

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(BatchSettings)

C#
public bool Equals(BatchSettings other)

Parameters

other BatchSettings

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(BatchSettings, BatchSettings)

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

Parameters

left BatchSettings

right BatchSettings

Returns

bool

operator !=(BatchSettings, BatchSettings)

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

Parameters

left BatchSettings

right BatchSettings

Returns

bool