GraphicsAPI reference
Struct BatchSettings
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics
The settings of one batch, from Begin to End.
public readonly struct BatchSettings : IEquatable<BatchSettings>Implements
Constructors
BatchSettings(RenderTarget, Matrix3x2?, BlendState?, SamplerDescription?, SortMode, RectI?, ColorF?, RectI?)
The settings of one batch, from Begin to End.
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).
public BlendState? Blend { get; init; }Property Value
Clear
A premultiplied colour the target is cleared to first; null keeps its contents.
public ColorF? Clear { get; init; }Property Value
Sampler
The batch’s sampler; null is PointClamp.
public SamplerDescription? Sampler { get; init; }Property Value
Scissor
The batch’s scissor in target pixels; null draws on the whole target.
public RectI? Scissor { get; init; }Property Value
Sort
The order draws reach the device.
public SortMode Sort { get; init; }Property Value
Target
Where the batch renders: an offscreen target or the surface target acquired this frame.
public RenderTarget Target { get; init; }Property Value
View
Applied after every draw’s transform (a camera’s WorldToView); null is the identity.
public Matrix3x2? View { get; init; }Property Value
Viewport
The viewport in target pixels; null is the whole target.
public RectI? Viewport { get; init; }Property Value
Methods
Deconstruct(out RenderTarget, out Matrix3x2?, out BlendState?, out SamplerDescription?, out SortMode, out RectI?, out ColorF?, out RectI?)
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)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(BatchSettings)
public bool Equals(BatchSettings other)Parameters
other BatchSettings
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(BatchSettings, BatchSettings)
public static bool operator ==(BatchSettings left, BatchSettings right)Parameters
left BatchSettings
right BatchSettings
Returns
operator !=(BatchSettings, BatchSettings)
public static bool operator !=(BatchSettings left, BatchSettings right)Parameters
left BatchSettings
right BatchSettings