Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    RenderSystem Class

    Namespace: Stride.Rendering
    Assembly: 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.

    System.Object → DisposeBase → ComponentBase → RenderSystem
    Derived from RenderSystem:

    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
    | Improve this Doc View Source

    Constructors


    RenderSystem()

    public RenderSystem()
    | Improve this Doc View Source

    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>
    | Improve this Doc View Source

    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
    ComponentBase.Destroy()

    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()
    | Improve this Doc View Source

    Events


    RenderStageSelectorsChanged

    public event Action RenderStageSelectorsChanged
    Event Type
    Type Description
    System.Action

    Inherited Members

    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation