Class SpriteBatchRenderUnit
Render unit used to draw a batch of sprites.
Inherited Members
Namespace: Evergine.Framework.Graphics.Sprite
Assembly: Evergine.Framework.dll
Syntax
public class SpriteBatchRenderUnit : RenderUnit
Constructors
SpriteBatchRenderUnit(SpriteMeshProcessor, int)
Initializes a new instance of the SpriteBatchRenderUnit class.
Declaration
public SpriteBatchRenderUnit(SpriteMeshProcessor spriteProcessor, int batchId)
Parameters
Type | Name | Description |
---|---|---|
SpriteMeshProcessor | spriteProcessor | Sprite processor. |
int | batchId | Batch id. |
Methods
Collect(DrawContext)
Collect all the information to be rendered.
Declaration
public override void Collect(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The draw context. |
Overrides
PassIsAvailable(DrawContext, int)
Return if the pass is available in this render unit.
Declaration
public override bool PassIsAvailable(DrawContext drawContext, int passId)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The DrawContext. |
int | passId | The Pass Id. |
Returns
Type | Description |
---|---|
bool | True if the pass is available. |
Overrides
Prepare(CommandBuffer, DrawContext)
Prepare this unit to be rendered.
Declaration
public override void Prepare(CommandBuffer commandBuffer, DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | commandBuffer | The command buffer. |
DrawContext | drawContext | The draw context. |
Overrides
Render(CommandBuffer, DrawContext, int)
Render a element, using the specified commandBuffer.
Declaration
public override void Render(CommandBuffer commandBuffer, DrawContext drawContext, int passId)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | commandBuffer | The command buffer. |
DrawContext | drawContext | The draw context. |
int | passId | The pass id. |