Table of Contents

Class RenderFeature

Namespace
Stride.Rendering
Assembly
Stride.Rendering.dll

Entry-point for implementing rendering feature.

[DataContract(Inherited = true, DefaultMemberMode = DataMemberMode.Never)]
public abstract class RenderFeature : ComponentBase, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
Inheritance
RenderFeature
Implements
Derived
Inherited Members
Extension Methods

Properties

Context

protected RenderContext Context { get; }

Property Value

RenderContext

Enabled

Gets or sets a value indicating whether this IGraphicsRenderer is enabled.

public bool Enabled { get; set; }

Property Value

bool

true if enabled; otherwise, false.

Initialized

Gets a value indicating whether this renderer is initialized.

public bool Initialized { get; }

Property Value

bool

RenderSystem

public RenderSystem RenderSystem { get; }

Property Value

RenderSystem

Methods

Collect()

Performs pipeline initialization, enumerates views and populates visibility groups.

public virtual void Collect()

Destroy()

Disposes of object resources.

protected override void 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

context RenderDrawContext
renderView RenderView
renderViewStage RenderViewStage

Draw(RenderDrawContext, RenderView, RenderViewStage, int, int)

Performs GPU updates and/or draw.

public virtual void Draw(RenderDrawContext context, RenderView renderView, RenderViewStage renderViewStage, int startIndex, int endIndex)

Parameters

context RenderDrawContext
renderView RenderView
renderViewStage RenderViewStage
startIndex int
endIndex int

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

context RenderDrawContext

Initialize(RenderContext)

Loads this renderer. See remarks.

public void Initialize(RenderContext context)

Parameters

context RenderContext

The context.

Remarks

This method allow a renderer to prepare for rendering. This method should be called once to initialize a renderer.

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

context RenderDrawContext

PrepareEffectPermutations(RenderDrawContext)

Perform effect permutations, before Prepare(RenderDrawContext).

public virtual void PrepareEffectPermutations(RenderDrawContext context)

Parameters

context RenderDrawContext

Unload()

public virtual void Unload()