Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    RenderFeature Class

    Namespace: Stride.Rendering
    Assembly: Stride.Rendering.dll

    Entry-point for implementing rendering feature.

    System.Object → DisposeBase → ComponentBase → RenderFeature
    Derived from RenderFeature: RootRenderFeature SubRenderFeature

    [DataContract(Inherited = true, DefaultMemberMode = DataMemberMode.Never)]
    public abstract class RenderFeature : ComponentBase, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
    Name Description
    Properties
    Context
    Enabled
    Initialized
    RenderSystem
    Methods
    Collect()

    Performs pipeline initialization, enumerates views and populates visibility groups.

    Destroy()
    Draw(RenderDrawContext, RenderView, RenderViewStage)

    Performs GPU updates and/or drawing, everytime a render view changes.

    Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)

    Performs GPU updates and/or draw.

    Extract()

    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)

    Releases temporary resources and cleans the state. Should be called once after all Draw(RenderDrawContext, RenderView, RenderViewStage) calls have finished.

    Initialize(RenderContext)
    InitializeCore()

    Initializes this instance. Query for specific cbuffer (either new one, like PerMaterial, or parts of an existing one, like PerObject=>Skinning)

    OnRenderSystemChanged()
    Prepare(RenderDrawContext)

    Performs most of the work (computation and resource preparation). Later game simulation might be running during that step.

    PrepareEffectPermutations(RenderDrawContext)

    Perform effect permutations, before Prepare(RenderDrawContext).

    Unload()
    | Improve this Doc View Source

    Properties


    Context

    protected RenderContext Context { get; }
    Property Value
    Type Description
    RenderContext

    Enabled

    public bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    Initialized

    public bool Initialized { get; }
    Property Value
    Type Description
    System.Boolean

    RenderSystem

    public RenderSystem RenderSystem { get; }
    Property Value
    Type Description
    RenderSystem
    | Improve this Doc View Source

    Methods


    Collect()

    Performs pipeline initialization, enumerates views and populates visibility groups.

    public virtual void Collect()

    Destroy()

    protected override void Destroy()
    Overrides
    ComponentBase.Destroy()

    Draw(RenderDrawContext, RenderView, RenderViewStage)

    Performs GPU updates and/or drawing, everytime a render view changes.

    public virtual void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage)
    Parameters
    Type Name Description
    RenderDrawContext context
    RenderView renderView
    RenderViewStage renderViewStage

    Draw(RenderDrawContext, RenderView, RenderViewStage, Int32, Int32)

    Performs GPU updates and/or draw.

    public virtual void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage, int startIndex, int endIndex)
    Parameters
    Type Name Description
    RenderDrawContext context
    RenderView renderView
    RenderViewStage renderViewStage
    System.Int32 startIndex
    System.Int32 endIndex

    Extract()

    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 virtual void Extract()

    Flush(RenderDrawContext)

    Releases temporary resources and cleans the state. Should be called once after all Draw(RenderDrawContext, RenderView, RenderViewStage) calls have finished.

    public virtual void Flush(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    Initialize(RenderContext)

    public void Initialize(RenderContext context)
    Parameters
    Type Name Description
    RenderContext context

    InitializeCore()

    Initializes this instance. Query for specific cbuffer (either new one, like PerMaterial, or parts of an existing one, like PerObject=>Skinning)

    protected virtual void InitializeCore()

    OnRenderSystemChanged()

    protected virtual void OnRenderSystemChanged()

    Prepare(RenderDrawContext)

    Performs most of the work (computation and resource preparation). Later game simulation might be running during that step.

    public virtual void Prepare(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    PrepareEffectPermutations(RenderDrawContext)

    Perform effect permutations, before Prepare(RenderDrawContext).

    public virtual void PrepareEffectPermutations(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    Unload()

    public virtual void Unload()

    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