Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    RenderContext Class

    Namespace: Stride.Rendering
    Assembly: Stride.Rendering.dll

    Rendering context.

    System.Object → DisposeBase → ComponentBase → RenderContext
    Derived from RenderContext:

    public sealed class RenderContext : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
    Name Description
    Fields
    RenderOutput

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

    ViewportState

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

    Properties
    Allocator

    Gets the GraphicsResource allocator.

    Effects

    Gets the content manager.

    GraphicsDevice

    Gets the graphics device.

    RenderSystem

    The current render system.

    RenderView

    The current render view.

    Services

    Gets the services registry.

    StreamingManager

    The streaming manager.

    Time

    Gets or sets the time.

    VisibilityGroup

    The current visibility group from the and RenderSystem.

    Methods
    Destroy()
    Flush()
    GetShared(IServiceRegistry)

    Gets a global shared context.

    GetThreadContext()
    PushRenderViewAndRestore(RenderView)

    Pushes a render view and restores it after using it.

    Reset()
    SaveRenderOutputAndRestore()

    Saves a viewport and restores it after using it.

    SaveViewportAndRestore()

    Saves a viewport state and restores after using it.

    Events
    RendererInitialized

    Occurs when a renderer is initialized.

    | Improve this Doc View Source

    Fields


    RenderOutput

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

    public RenderOutputDescription RenderOutput
    Field Value
    Type Description
    RenderOutputDescription

    ViewportState

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

    public ViewportState ViewportState
    Field Value
    Type Description
    ViewportState
    | Improve this Doc View Source

    Properties


    Allocator

    Gets the GraphicsResource allocator.

    public GraphicsResourceAllocator Allocator { get; }
    Property Value
    Type Description
    GraphicsResourceAllocator

    The allocator.


    Effects

    Gets the content manager.

    public EffectSystem Effects { get; }
    Property Value
    Type Description
    EffectSystem

    The content manager.


    GraphicsDevice

    Gets the graphics device.

    public GraphicsDevice GraphicsDevice { get; }
    Property Value
    Type Description
    GraphicsDevice

    The graphics device.


    RenderSystem

    The current render system.

    public RenderSystem RenderSystem { get; set; }
    Property Value
    Type Description
    RenderSystem

    RenderView

    The current render view.

    public RenderView RenderView { get; set; }
    Property Value
    Type Description
    RenderView

    Services

    Gets the services registry.

    public IServiceRegistry Services { get; }
    Property Value
    Type Description
    IServiceRegistry

    The services registry.


    StreamingManager

    The streaming manager.

    public StreamingManager StreamingManager { get; set; }
    Property Value
    Type Description
    StreamingManager

    Time

    Gets or sets the time.

    public GameTime Time { get; set; }
    Property Value
    Type Description
    GameTime

    VisibilityGroup

    The current visibility group from the and RenderSystem.

    public VisibilityGroup VisibilityGroup { get; set; }
    Property Value
    Type Description
    VisibilityGroup
    | Improve this Doc View Source

    Methods


    Destroy()

    protected override void Destroy()
    Overrides
    ComponentBase.Destroy()

    Flush()

    public void Flush()

    GetShared(IServiceRegistry)

    Gets a global shared context.

    public static RenderContext GetShared(IServiceRegistry services)
    Parameters
    Type Name Description
    IServiceRegistry services

    The services.

    Returns
    Type Description
    RenderContext

    RenderContext.


    GetThreadContext()

    public RenderDrawContext GetThreadContext()
    Returns
    Type Description
    RenderDrawContext

    PushRenderViewAndRestore(RenderView)

    Pushes a render view and restores it after using it.

    public RenderContext.RenderViewRestore PushRenderViewAndRestore(RenderView renderView)
    Parameters
    Type Name Description
    RenderView renderView

    The render view.

    Returns
    Type Description
    RenderContext.RenderViewRestore

    Reset()

    public void Reset()

    SaveRenderOutputAndRestore()

    Saves a viewport and restores it after using it.

    public RenderContext.RenderOutputRestore SaveRenderOutputAndRestore()
    Returns
    Type Description
    RenderContext.RenderOutputRestore

    SaveViewportAndRestore()

    Saves a viewport state and restores after using it.

    public RenderContext.ViewportRestore SaveViewportAndRestore()
    Returns
    Type Description
    RenderContext.ViewportRestore
    | Improve this Doc View Source

    Events


    RendererInitialized

    Occurs when a renderer is initialized.

    public event Action<IGraphicsRendererCore> RendererInitialized
    Event Type
    Type Description
    System.Action<IGraphicsRendererCore>

    Inherited Members

    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    CameraComponentRendererExtensions.GetCurrentCamera(RenderContext)
    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation