RenderSystem Class
Namespace: Stride.RenderingAssembly: Stride.Rendering.dll
Facility to perform rendering: extract rendering data from scene, determine effects and GPU states, compute and prepare data (i.e. matrices, buffers, etc...) and finally draw it.
public class RenderSystem : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Name | Description | |
---|---|---|
Constructors | ||
RenderSystem() | ||
Properties | ||
EffectSystem | The effect system, used to compile effects. |
|
FrameCounter | Frame counter, mostly for internal use. |
|
GraphicsDevice | The graphics device, used to create graphics resources. |
|
RenderContextOld | ||
RenderFeatures | List of render features |
|
RenderStages | List of render stages. |
|
Services | Gets the services registry. |
|
Views | List of views. |
|
Methods | ||
AddRenderObject(RenderObject) | Adds a RenderObject to the rendering. |
|
Collect(RenderContext) | Performs pipeline initialization, enumerates views and populates visibility groups. |
|
Destroy() | ||
Draw(RenderDrawContext, RenderView, RenderStage) | ||
Extract(RenderContext) | Extract data from entities, should be as fast as possible to not block simulation loop. It should be mostly copies, and the actual processing should be part of Prepare(). |
|
Flush(RenderDrawContext) | Finalizes the render features work and releases temporary resources if necessary. |
|
Initialize(RenderContext) | Initializes the render system. |
|
Prepare(RenderDrawContext) | Performs most of the work (computation and resource preparation). Later game simulation might be running during that step. |
|
RemoveRenderObject(RenderObject) | Removes a RenderObject from the rendering. |
|
Reset() | Reset render objects and features. Should be called at beginning of Extract phase. |
|
Events | ||
RenderStageSelectorsChanged |
Constructors
RenderSystem()
public RenderSystem()
Properties
EffectSystem
The effect system, used to compile effects.
public EffectSystem EffectSystem { get; }
Property Value
Type | Description |
---|---|
EffectSystem |
FrameCounter
Frame counter, mostly for internal use.
public int FrameCounter { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
GraphicsDevice
The graphics device, used to create graphics resources.
public GraphicsDevice GraphicsDevice { get; }
Property Value
Type | Description |
---|---|
GraphicsDevice |
RenderContextOld
public RenderContext RenderContextOld { get; }
Property Value
Type | Description |
---|---|
RenderContext |
RenderFeatures
List of render features
public FastTrackingCollection<RootRenderFeature> RenderFeatures { get; }
Property Value
Type | Description |
---|---|
FastTrackingCollection<RootRenderFeature> |
RenderStages
List of render stages.
public FastTrackingCollection<RenderStage> RenderStages { get; }
Property Value
Type | Description |
---|---|
FastTrackingCollection<RenderStage> |
Services
Gets the services registry.
public IServiceRegistry Services { get; }
Property Value
Type | Description |
---|---|
IServiceRegistry | The services registry. |
Views
List of views.
public FastTrackingCollection<RenderView> Views { get; }
Property Value
Type | Description |
---|---|
FastTrackingCollection<RenderView> |
Methods
AddRenderObject(RenderObject)
Adds a RenderObject to the rendering.
public void AddRenderObject(RenderObject renderObject)
Parameters
Type | Name | Description |
---|---|---|
RenderObject | renderObject |
Collect(RenderContext)
Performs pipeline initialization, enumerates views and populates visibility groups.
public void Collect(RenderContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | context |
Destroy()
protected override void Destroy()
Overrides
Draw(RenderDrawContext, RenderView, RenderStage)
public void Draw(RenderDrawContext renderDrawContext, RenderView renderView, RenderStage renderStage)
Parameters
Type | Name | Description |
---|---|---|
RenderDrawContext | renderDrawContext | |
RenderView | renderView | |
RenderStage | renderStage |
Extract(RenderContext)
Extract data from entities, should be as fast as possible to not block simulation loop. It should be mostly copies, and the actual processing should be part of Prepare().
public void Extract(RenderContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | context |
Flush(RenderDrawContext)
Finalizes the render features work and releases temporary resources if necessary.
public void Flush(RenderDrawContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderDrawContext | context |
Initialize(RenderContext)
Initializes the render system.
public void Initialize(RenderContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderContext | context |
Prepare(RenderDrawContext)
Performs most of the work (computation and resource preparation). Later game simulation might be running during that step.
public void Prepare(RenderDrawContext context)
Parameters
Type | Name | Description |
---|---|---|
RenderDrawContext | context |
RemoveRenderObject(RenderObject)
Removes a RenderObject from the rendering.
public void RemoveRenderObject(RenderObject renderObject)
Parameters
Type | Name | Description |
---|---|---|
RenderObject | renderObject |
Reset()
Reset render objects and features. Should be called at beginning of Extract phase.
public void Reset()
Events
RenderStageSelectorsChanged
public event Action RenderStageSelectorsChanged
Event Type
Type | Description |
---|---|
System.Action |