GraphicsAPI reference
Struct RenderState
Namespace: MicroEngine.Graphics
Assembly: MicroEngine.Graphics2D.dll
Guide: Graphics
The per-draw state of the 2D batcher (State): blend, sampler and scissor.
public readonly struct RenderState : IEquatable<RenderState>Implements
Constructors
RenderState(BlendState, SamplerDescription, RectI?)
The per-draw state of the 2D batcher (State): blend, sampler and scissor.
public RenderState(BlendState Blend, SamplerDescription Sampler, RectI? Scissor)Parameters
Blend BlendState
Blend state; the built-in presets work on every device.
Sampler SamplerDescription
Sampler of the draws’ textures.
Scissor RectI?
Scissor in target pixels; null draws on the whole viewport.
Properties
Blend
Blend state; the built-in presets work on every device.
public BlendState Blend { get; init; }Property Value
Default
Premultiplied alpha blending, nearest clamped sampling, no scissor.
public static RenderState Default { get; }Property Value
Sampler
Sampler of the draws’ textures.
public SamplerDescription Sampler { get; init; }Property Value
Scissor
Scissor in target pixels; null draws on the whole viewport.
public RectI? Scissor { get; init; }Property Value
Methods
Deconstruct(out BlendState, out SamplerDescription, out RectI?)
public void Deconstruct(out BlendState Blend, out SamplerDescription Sampler, out RectI? Scissor)Parameters
Blend BlendState
Sampler SamplerDescription
Scissor RectI?
Equals(object)
public override bool Equals(object obj)Parameters
obj object
Returns
Equals(RenderState)
public bool Equals(RenderState other)Parameters
other RenderState
Returns
GetHashCode()
public override int GetHashCode()Returns
ToString()
public override string ToString()Returns
Operators
operator ==(RenderState, RenderState)
public static bool operator ==(RenderState left, RenderState right)Parameters
left RenderState
right RenderState
Returns
operator !=(RenderState, RenderState)
public static bool operator !=(RenderState left, RenderState right)Parameters
left RenderState
right RenderState