I2DBatchedRenderPass

interface I2DBatchedRenderPass : IRenderPass, Protogame.IRenderPassWithViewport

A render pass in which graphics rendering is configured for an orthographic view. When this render pass is active, the X and Y positions of entities map directly to the X and Y positions of the game window, with (0, 0) being located in the top-left.

During this render pass, all texture render calls are batched together with a T:Microsoft.Xna.Framework.Graphics.SpriteBatch, and flushed at the end of the render pass.

SpriteSortMode TextureSortMode

Gets or sets the sorting mode for textures during batch rendering.

This value is used as the sorting mode for the underlying T:Microsoft.Xna.Framework.Graphics.SpriteBatch.

Value:The sorting mode to use when rendering textures.
void RestartWithTransformMatrix(IRenderContext renderContext, Matrix matrix)

Restarts the current sprite batch rendering using the new matrix. This effectively calls End followed by an immediate Begin on the sprite batch. This matrix value is stored by the render pass and applied every time in the future, until you call M:Protogame.I2DBatchedRenderPass.RestartWithTransformMatrix(Protogame.IRenderContext,Microsoft.Xna.Framework.Matrix) again.

Parameters:
  • renderContext (Protogame.IRenderContext) – The current render context.
  • matrix (Microsoft.Xna.Framework.Matrix) – The transformation matrix to use for the sprite batch.