Table of Contents

Interface IRenderContextFactory

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

Begins the render passes and encoders that a frame draws with, and builds and runs its frame graphs.

public interface IRenderContextFactory

Methods

Begin(RenderPassTag?, string)

Begins an encoder for drawing in the current frame. Dispose the scope to submit what it recorded.

IRenderEncoderScope Begin(RenderPassTag? passTag = null, string passName = null)

Parameters

passTag RenderPassTag?
passName string

Returns

IRenderEncoderScope

BeginRenderPass(RenderPassDescriptor)

Begins a render pass that draws into the target descriptor describes. Dispose the returned scope to end the pass.

RenderPassScope BeginRenderPass(RenderPassDescriptor descriptor)

Parameters

descriptor RenderPassDescriptor

Returns

RenderPassScope

CreateFrameGraph(FrameGraphValidationMode)

Creates a new frame-graph builder for the current frame.

FrameGraphBuilder CreateFrameGraph(FrameGraphValidationMode validationMode = FrameGraphValidationMode.Disabled)

Parameters

validationMode FrameGraphValidationMode

Returns

FrameGraphBuilder

Execute(FrameGraph)

Executes the provided frame graph, automatically managing render-pass scopes.

void Execute(FrameGraph frameGraph)

Parameters

frameGraph FrameGraph

SetGameTime(IGameTime)

Sets the game time that encoders begin with, so that shaders receive the total time.

void SetGameTime(IGameTime gameTime)

Parameters

gameTime IGameTime