Class RenderSystem
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
- Inheritance
-
RenderSystem
- Implements
- Inherited Members
- Extension Methods
Constructors
RenderSystem()
public RenderSystem()
Properties
EffectSystem
The effect system, used to compile effects.
public EffectSystem EffectSystem { get; }
Property Value
FrameCounter
Frame counter, mostly for internal use.
public int FrameCounter { get; }
Property Value
GraphicsDevice
The graphics device, used to create graphics resources.
public GraphicsDevice GraphicsDevice { get; }
Property Value
RenderContextOld
public RenderContext RenderContextOld { get; }
Property Value
RenderFeatures
List of render features
public FastTrackingCollection<RootRenderFeature> RenderFeatures { get; }
Property Value
RenderStages
List of render stages.
public FastTrackingCollection<RenderStage> RenderStages { get; }
Property Value
Services
Gets the services registry.
public IServiceRegistry Services { get; }
Property Value
- IServiceRegistry
The services registry.
Views
List of views.
public FastTrackingCollection<RenderView> Views { get; }
Property Value
Methods
AddRenderObject(RenderObject)
Adds a RenderObject to the rendering.
public void AddRenderObject(RenderObject renderObject)
Parameters
renderObject
RenderObject
Collect(RenderContext)
Performs pipeline initialization, enumerates views and populates visibility groups.
public void Collect(RenderContext context)
Parameters
context
RenderContext
Destroy()
Disposes of object resources.
protected override void Destroy()
Draw(RenderDrawContext, RenderView, RenderStage)
public void Draw(RenderDrawContext renderDrawContext, RenderView renderView, RenderStage renderStage)
Parameters
renderDrawContext
RenderDrawContextrenderView
RenderViewrenderStage
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
context
RenderContext
Flush(RenderDrawContext)
Finalizes the render features work and releases temporary resources if necessary.
public void Flush(RenderDrawContext context)
Parameters
context
RenderDrawContext
Initialize(RenderContext)
Initializes the render system.
public void Initialize(RenderContext context)
Parameters
context
RenderContext
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
context
RenderDrawContext
RemoveRenderObject(RenderObject)
Removes a RenderObject from the rendering.
public void RemoveRenderObject(RenderObject renderObject)
Parameters
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