Struct RenderBatch
Represents a batch to be rendered.
Namespace: Evergine.Framework.Graphics
Assembly: Evergine.Framework.dll
Syntax
public struct RenderBatch
Fields
BatchIdx
The index of the batch.
Declaration
public int BatchIdx
Field Value
Type | Description |
---|---|
int |
EndIndex
The index at which the object ends.
Declaration
public int EndIndex
Field Value
Type | Description |
---|---|
int |
Id
Batch ID.
Declaration
public int Id
Field Value
Type | Description |
---|---|
int |
MeshProcessor
The mesh processor.
Declaration
public MeshProcessor MeshProcessor
Field Value
Type | Description |
---|---|
MeshProcessor |
RenderFeature
The rendering feature.
Declaration
public RenderFeature RenderFeature
Field Value
Type | Description |
---|---|
RenderFeature |
StartIndex
The object's start index.
Declaration
public int StartIndex
Field Value
Type | Description |
---|---|
int |
TemplateRenderObjectInfo
Object template.
Declaration
public RenderObjectInfo TemplateRenderObjectInfo
Field Value
Type | Description |
---|---|
RenderObjectInfo |
Properties
Count
Gets the batch count.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
Methods
Collect(DrawContext)
The mesh processor collects this batch.
Declaration
public void Collect(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The draw context. |
CollectTemplate(DrawContext)
Collects the template render object info.
Declaration
public void CollectTemplate(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The drawing context. |
EmitBatchToProcessor(DrawContext)
Notifies this batch to the associated mesh processor.
Declaration
public bool EmitBatchToProcessor(DrawContext drawContext)
Parameters
Type | Name | Description |
---|---|---|
DrawContext | drawContext | The drawing context. |
Returns
Type | Description |
---|---|
bool | True if everything is OK. |
Prepare(CommandBuffer, DrawContext)
Renders this batch using the specified commandBuffer.
Declaration
public 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 this batch using the specified command buffer.
Declaration
public 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. |