Table of Contents

Class FrameGraph

Namespace
BSGameLib.Game.Rendering
Assembly
BSGameLib.Game.dll

Runs a frame's render passes in order, releasing each transient resource once the last pass that uses it has run. A graph is built with FrameGraphBuilder and run with Execute(FrameGraph).

public sealed class FrameGraph
Inheritance
FrameGraph
Inherited Members

Properties

Passes

The passes, in the order they run, with what each reads and writes.

public IReadOnlyList<FrameGraphPassDescription> Passes { get; }

Property Value

IReadOnlyList<FrameGraphPassDescription>

Methods

CreateDebugInfo()

Returns the passes and resources of the graph as a FrameGraphDebugInfo.

public FrameGraphDebugInfo CreateDebugInfo()

Returns

FrameGraphDebugInfo

DumpResources(TextWriter)

Writes each resource of the graph to writer, with its size and the pass after which it is released.

public void DumpResources(TextWriter writer)

Parameters

writer TextWriter

Execute(FrameGraphExecutionContext, Action<FrameGraphPassContext, Action>)

Runs each pass in order, and after each one releases the transient resources that the graph schedules for release after it. context defaults to Empty.

public void Execute(FrameGraphExecutionContext context = null, Action<FrameGraphPassContext, Action> passExecutor = null)

Parameters

context FrameGraphExecutionContext
passExecutor Action<FrameGraphPassContext, Action>

When given, runs each pass in place of running it directly. It is called with the pass's context and an action that runs the pass.