Class MeshProcessor
Struct that represents a mesh to render.
Inheritance
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public abstract class MeshProcessor
Constructors
MeshProcessor()
Initializes a new instance of the MeshProcessor class.
Declaration
public MeshProcessor()
Fields
GraphicsContext
Represents the graphics context.
Declaration
protected GraphicsContext GraphicsContext
Field Value
Type | Description |
---|---|
GraphicsContext |
IsActivated
Indicates if this mesh processor is active.
Declaration
public bool IsActivated
Field Value
Type | Description |
---|---|
bool |
RenderManager
The rendering manager.
Declaration
protected RenderManager RenderManager
Field Value
Type | Description |
---|---|
RenderManager |
Properties
Priority
Gets the priority of this processor. Processors with higher values are executed earlier.
Declaration
public abstract float Priority { get; }
Property Value
Type | Description |
---|---|
float |
Methods
Collect()
Collects batches to be rendered.
Declaration
public virtual void Collect()
CouldBatch(RenderObjectInfo, RenderObjectInfo)
Compares whether this processor can 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)
Can 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 can render an object. |
Destroy()
Destroys 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 in this batch. |
DrawContext | drawContext | The draw context. |
MeshProcessor.RenderObjectInfoAccessor | renderObjectInfoAccessor | Function to obtain the renderObjectInfo by its index. |
Returns
Type | Description |
---|---|
RenderUnit | Id of this batch inside the mesh processor. |
~MeshProcessor()
Finalizes an instance of the MeshProcessor class.
Declaration
protected ~MeshProcessor()
Initialize()
Initializes this mesh processor.
Declaration
protected virtual void Initialize()
Reset()
Resets processors to be ready for batch processing.
Declaration
public virtual void Reset()