RenderFeature Class
Namespace: Stride.RenderingAssembly: 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
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() |
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 |
Methods
Collect()
Performs pipeline initialization, enumerates views and populates visibility groups.
public virtual void Collect()
Destroy()
protected override void Destroy()
Overrides
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()