Class InstancingBatchRenderUnit
This represent an Instancing Batch render unit.
Inherited Members
Namespace: Evergine.Framework.Graphics.Instancing
Assembly: Evergine.Framework.dll
Syntax
public class InstancingBatchRenderUnit : MeshRenderUnit
Constructors
InstancingBatchRenderUnit(RenderMeshInfo, uint)
Initializes a new instance of the InstancingBatchRenderUnit class.
Declaration
public InstancingBatchRenderUnit(RenderMeshInfo info, uint instanceCount = 1)
Parameters
Type | Name | Description |
---|---|---|
RenderMeshInfo | info | The mesh info. |
uint | instanceCount | The instance count. |
InstancingBatchRenderUnit(uint)
Initializes a new instance of the InstancingBatchRenderUnit class.
Declaration
public InstancingBatchRenderUnit(uint instanceCount = 1)
Parameters
Type | Name | Description |
---|---|---|
uint | instanceCount | The instance count. |
Fields
InstancingWorld
The instancing world array.
Declaration
public Matrix4x4[] InstancingWorld
Field Value
Type | Description |
---|---|
Matrix4x4[] |
InstancingWorldOffset
The instancing world offset.
Declaration
public int InstancingWorldOffset
Field Value
Type | Description |
---|---|
int |
Methods
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 = 0)
Parameters
Type | Name | Description |
---|---|---|
CommandBuffer | commandBuffer | The command buffer. |
DrawContext | drawContext | The draw context. |
int | passId | The pass id. |