Table of Contents

Class SpriteBatch

Namespace
Axolotl2D.Rendering
Assembly
Axolotl2D.dll

Queues sprites and submits them in texture batches at the end of a scene frame.

public sealed class SpriteBatch
Inheritance
SpriteBatch
Inherited Members

Constructors

SpriteBatch(Rendering, Camera2D)

Queues sprites and submits them in texture batches at the end of a scene frame.

public SpriteBatch(Rendering rendering, Camera2D defaultCamera)

Parameters

rendering Rendering
defaultCamera Camera2D

Properties

IsBegun

public bool IsBegun { get; }

Property Value

bool

Methods

Begin(Camera2D?)

public void Begin(Camera2D? camera = null)

Parameters

camera Camera2D

Draw(Sprite, Matrix3x2, Color?, CoordinateSpace, float)

public void Draw(Sprite sprite, Matrix3x2 transform, Color? tint = null, CoordinateSpace space = CoordinateSpace.World, float depth = 0)

Parameters

sprite Sprite
transform Matrix3x2
tint Color
space CoordinateSpace
depth float

Draw(Sprite, Vector2, Vector2?, float, Color?, CoordinateSpace, float)

public void Draw(Sprite sprite, Vector2 position, Vector2? size = null, float rotation = 0, Color? tint = null, CoordinateSpace space = CoordinateSpace.World, float depth = 0)

Parameters

sprite Sprite
position Vector2
size Vector2?
rotation float
tint Color
space CoordinateSpace
depth float

Draw(Texture2D, Vector2, Vector2?, Color?, CoordinateSpace, float)

public void Draw(Texture2D texture, Vector2 position, Vector2? size = null, Color? tint = null, CoordinateSpace space = CoordinateSpace.World, float depth = 0)

Parameters

texture Texture2D
position Vector2
size Vector2?
tint Color
space CoordinateSpace
depth float

End()

public void End()

UseShader(ShaderProgram)

Selects a custom shader for draws submitted inside the returned scope.

public IDisposable UseShader(ShaderProgram program)

Parameters

program ShaderProgram

Returns

IDisposable