Class SpriteBatch
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
Properties
IsBegun
public bool IsBegun { get; }
Property Value
Methods
Begin(Camera2D?)
public void Begin(Camera2D? camera = null)
Parameters
cameraCamera2D
Draw(Sprite, Matrix3x2, Color?, CoordinateSpace, float)
public void Draw(Sprite sprite, Matrix3x2 transform, Color? tint = null, CoordinateSpace space = CoordinateSpace.World, float depth = 0)
Parameters
spriteSpritetransformMatrix3x2tintColorspaceCoordinateSpacedepthfloat
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
spriteSpritepositionVector2sizeVector2?rotationfloattintColorspaceCoordinateSpacedepthfloat
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
End()
public void End()
UseShader(ShaderProgram)
Selects a custom shader for draws submitted inside the returned scope.
public IDisposable UseShader(ShaderProgram program)
Parameters
programShaderProgram