Class RenderUnit
Struct that represents a mesh to render.
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public abstract class RenderUnit
Properties
BoundingBox
Gets the bounding box of this rendering unit.
Declaration
public virtual BoundingBox? BoundingBox { get; }
Property Value
| Type | Description |
|---|---|
| BoundingBox? |
Methods
Collect(DrawContext)
Collects all the information to be rendered.
Declaration
public abstract void Collect(DrawContext drawContext)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawContext | drawContext | The drawing context. |
CollectBarriers(DrawContext, int, List<Barrier>, List<Barrier>)
Collects the resources used by this RenderUnit in the given pass. It will also include some information about the usage of the resource: the type and shader stages.
Declaration
public abstract void CollectBarriers(DrawContext drawContext, int passId, List<Buffer.Barrier> bufferBarriers, List<Texture.Barrier> textureBarriers)
Parameters
| Type | Name | Description |
|---|---|---|
| DrawContext | drawContext | The DrawContext. |
| int | passId | The Pass Id. |
| List<Buffer.Barrier> | bufferBarriers | List of buffer barriers to be filled. |
| List<Texture.Barrier> | textureBarriers | List of texture barriers to be filled. |
PassIsAvailable(DrawContext, int)
Returns if the pass is available in this render unit.
Declaration
public abstract 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. |
Prepare(CommandBuffer, DrawContext)
Prepares this unit to be rendered.
Declaration
public abstract void Prepare(CommandBuffer commandBuffer, DrawContext drawContext)
Parameters
| Type | Name | Description |
|---|---|---|
| CommandBuffer | commandBuffer | The command buffer. |
| DrawContext | drawContext | The draw context. |
Render(CommandBuffer, DrawContext, int)
Renders an element using the specified command buffer.
Declaration
public abstract 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. |