Table of Contents

Interface ISpriteBatchRenderer

Namespace
BSGameLib.Game.Rendering
Assembly
BSGameLib.Game.dll

Collects sprites, then draws them all with Render().

public interface ISpriteBatchRenderer : IDisposable
Inherited Members

Methods

Add(in SpriteDrawOptions)

Adds a sprite to the batch.

void Add(in SpriteDrawOptions options)

Parameters

options SpriteDrawOptions

Render()

Draws the batched sprites, sorted by ZIndex unless external ordering is on.

void Render()

Reset(double, Matrix4x4)

Empties the batch for a new pass, and sets the game's total time in seconds and the projection the sprites are drawn with.

void Reset(double totalSeconds, Matrix4x4 projectionMatrix)

Parameters

totalSeconds double
projectionMatrix Matrix4x4

SetExternalOrdering(bool)

When enabled is true, the sprites are drawn in the order they were added, and ZIndex is not used to sort them. Reset(double, Matrix4x4) turns it off.

void SetExternalOrdering(bool enabled)

Parameters

enabled bool