Class MeshProcessor
Struct that represent a mesh to render.
Inheritance
Implements
Inherited Members
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public abstract class MeshProcessor : IDisposable
  Constructors
MeshProcessor()
Initializes a new instance of the MeshProcessor class.
Declaration
public MeshProcessor()
  Fields
GraphicsContext
The graphics context.
Declaration
protected GraphicsContext GraphicsContext
  Field Value
| Type | Description | 
|---|---|
| GraphicsContext | 
IsActivated
Indicate if this mesh processor is active.
Declaration
public bool IsActivated
  Field Value
| Type | Description | 
|---|---|
| bool | 
RenderManager
The render manager.
Declaration
protected RenderManager RenderManager
  Field Value
| Type | Description | 
|---|---|
| RenderManager | 
Properties
Priority
Gets the priority of this processor. Processors with higher values will be executed earlier.
Declaration
public abstract float Priority { get; }
  Property Value
| Type | Description | 
|---|---|
| float | 
Methods
Collect()
Collect batches to be rendered.
Declaration
public virtual void Collect()
  CouldBatch(RenderObjectInfo, RenderObjectInfo)
Compare if this processor could batch these two meshes.
Declaration
public abstract bool CouldBatch(RenderObjectInfo renderObjectInfo1, RenderObjectInfo renderObjectInfo2)
  Parameters
| Type | Name | Description | 
|---|---|---|
| RenderObjectInfo | renderObjectInfo1 | The first object.  | 
      
| RenderObjectInfo | renderObjectInfo2 | The second object.  | 
      
Returns
| Type | Description | 
|---|---|
| bool | True if the batch is possible.  | 
      
CouldRenderObject(RenderObjectInfo)
Could render a single render object.
Declaration
public abstract 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.  | 
      
Destroy()
Destroy this instance.
Declaration
protected virtual void Destroy()
  Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public void Dispose()
  EmitBatch(int, int, DrawContext, RenderObjectInfoAccessor)
Emit a render batch.
Declaration
public abstract RenderUnit EmitBatch(int startIndex, int elementCount, DrawContext drawContext, MeshProcessor.RenderObjectInfoAccessor renderObjectInfoAccessor)
  Parameters
| Type | Name | Description | 
|---|---|---|
| int | startIndex | start mesh index.  | 
      
| int | elementCount | Number of elements of this batch.  | 
      
| 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.  | 
      
~MeshProcessor()
Finalizes an instance of the MeshProcessor class.
Declaration
protected ~MeshProcessor()
  Initialize()
Initialize this mesh processor.
Declaration
protected virtual void Initialize()
  Reset()
Reset processors to be ready for batch collecting.
Declaration
public virtual void Reset()