Class BatcherMeshProcessor
Struct that represent a mesh to render.
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public abstract class BatcherMeshProcessor : MeshProcessor, IDisposable
Constructors
BatcherMeshProcessor()
Initializes a new instance of the BatcherMeshProcessor class.
Declaration
public BatcherMeshProcessor()
Methods
CheckMeshRequirements(RenderMeshInfo)
Checks the requirements of a mesh to be batched with others.
Declaration
protected abstract bool CheckMeshRequirements(RenderMeshInfo meshInfo)
Parameters
Type | Name | Description |
---|---|---|
RenderMeshInfo | meshInfo | The mesh info. |
Returns
Type | Description |
---|---|
bool | True if all is OK. |
Collect()
Collect batches to be rendered.
Declaration
public override void Collect()
Overrides
CouldBatch(RenderObjectInfo, RenderObjectInfo)
Compare if this processor could batch these two meshes.
Declaration
public override bool CouldBatch(RenderObjectInfo objectInfo1, RenderObjectInfo objectInfo2)
Parameters
Type | Name | Description |
---|---|---|
RenderObjectInfo | objectInfo1 | |
RenderObjectInfo | objectInfo2 |
Returns
Type | Description |
---|---|
bool | True if the batch is possible. |
Overrides
CouldRenderObject(RenderObjectInfo)
Could render a single render object.
Declaration
public override bool CouldRenderObject(RenderObjectInfo renderObjectInfo)
Parameters
Type | Name | Description |
---|---|---|
RenderObjectInfo | renderObjectInfo | The render object info. |
Returns
Type | Description |
---|---|
bool | True if this mesh processor could render an object. |
Overrides
Destroy()
Destroy all buffers.
Declaration
protected override void Destroy()
Overrides
EmitBatch(int, int, DrawContext, RenderObjectInfoAccessor)
Emit a render batch.
Declaration
public override RenderUnit EmitBatch(int startIndex, int batchElementCount, DrawContext drawContext, MeshProcessor.RenderObjectInfoAccessor renderObjectInfoAccessor)
Parameters
Type | Name | Description |
---|---|---|
int | startIndex | start mesh index. |
int | batchElementCount | |
DrawContext | drawContext | The draw context. |
MeshProcessor.RenderObjectInfoAccessor | renderObjectInfoAccessor | Function to obtain the a renderObjectInfo by its index. |
Returns
Type | Description |
---|---|
RenderUnit | Id of this batch inside mesh processor. |
Overrides
Reset()
Reset processors to be ready for batch collecting.
Declaration
public override void Reset()