Table of Contents

Class RenderContext

Namespace
Stride.Rendering
Assembly
Stride.Rendering.dll

Rendering context.

public sealed class RenderContext : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
RenderContext
Implements
Inherited Members
Extension Methods

Fields

RenderOutput

The current render output format (used during the collect phase).

public RenderOutputDescription RenderOutput

Field Value

RenderOutputDescription

ViewportState

The current render output format (used during the collect phase).

public ViewportState ViewportState

Field Value

ViewportState

Properties

Allocator

Gets the GraphicsResource allocator.

public GraphicsResourceAllocator Allocator { get; }

Property Value

GraphicsResourceAllocator

The allocator.

Effects

Gets the content manager.

public EffectSystem Effects { get; }

Property Value

EffectSystem

The content manager.

GraphicsDevice

Gets the graphics device.

public GraphicsDevice GraphicsDevice { get; }

Property Value

GraphicsDevice

The graphics device.

RenderSystem

The current render system.

public RenderSystem RenderSystem { get; set; }

Property Value

RenderSystem

RenderView

The current render view.

public RenderView RenderView { get; set; }

Property Value

RenderView

Services

Gets the services registry.

public IServiceRegistry Services { get; }

Property Value

IServiceRegistry

The services registry.

StreamingManager

The streaming manager.

public StreamingManager StreamingManager { get; set; }

Property Value

StreamingManager

Time

Gets or sets the time.

public GameTime Time { get; set; }

Property Value

GameTime

VisibilityGroup

The current visibility group from the SceneInstance and RenderSystem.

public VisibilityGroup VisibilityGroup { get; set; }

Property Value

VisibilityGroup

Methods

Destroy()

Disposes of object resources.

protected override void Destroy()

Flush()

public void Flush()

GetShared(IServiceRegistry)

Gets a global shared context.

public static RenderContext GetShared(IServiceRegistry services)

Parameters

services IServiceRegistry

The services.

Returns

RenderContext

RenderContext.

GetThreadContext()

public RenderDrawContext GetThreadContext()

Returns

RenderDrawContext

PushRenderViewAndRestore(RenderView)

Pushes a render view and restores it after using it.

public RenderContext.RenderViewRestore PushRenderViewAndRestore(RenderView renderView)

Parameters

renderView RenderView

The render view.

Returns

RenderContext.RenderViewRestore

Reset()

public void Reset()

SaveRenderOutputAndRestore()

Saves a viewport and restores it after using it.

public RenderContext.RenderOutputRestore SaveRenderOutputAndRestore()

Returns

RenderContext.RenderOutputRestore

SaveViewportAndRestore()

Saves a viewport state and restores after using it.

public RenderContext.ViewportRestore SaveViewportAndRestore()

Returns

RenderContext.ViewportRestore

Events

RendererInitialized

Occurs when a renderer is initialized.

public event Action<IGraphicsRendererCore> RendererInitialized

Event Type

Action<IGraphicsRendererCore>