Stride

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

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

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

    RendererCoreBase Class

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

    Base implementation of IGraphicsRenderer

    System.Object → DisposeBase → ComponentBase → RendererCoreBase
    Derived from RendererCoreBase: SceneRendererBase GraphicsRendererCollectionBase<T> RendererBase

    [DataContract]
    public abstract class RendererCoreBase : ComponentBase, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
    Name Description
    Constructors
    RendererCoreBase()

    Initializes a new instance of the RendererBase class.

    RendererCoreBase(String)

    Initializes a new instance of the ComponentBase class.

    Properties
    Content

    Gets the ContentManager.

    Context
    EffectSystem

    Gets the effect system.

    Enabled

    Gets or sets a value indicating whether this is enabled.

    GraphicsDevice

    Gets the graphics device.

    Initialized
    Profiling
    ProfilingKey
    Services

    Gets the IServiceRegistry.

    Methods
    CheckIsInDrawCore()

    Checks that the current execution path is between a PreDraw/PostDraw sequence and throws and exception if not.

    Destroy()
    EnsureContext(RenderContext)
    Initialize(RenderContext)
    InitializeCore()
    NewScopedBuffer(BufferDescription, PixelFormat)

    Gets a render target with the specified description, scoped for the duration of the .

    NewScopedTypedBuffer(Int32, PixelFormat, Boolean, GraphicsResourceUsage)

    Gets a render target with the specified description, scoped for the duration of the .

    PostDrawCore(RenderDrawContext)
    PostDrawCoreInternal(RenderDrawContext)
    PreDrawCore(RenderDrawContext)
    PreDrawCoreInternal(RenderDrawContext)
    PushScopedResource<T>(T)

    Pushes a new scoped resource to the current Draw.

    ToLoadAndUnload<T>(T)
    Unload()

    Unloads this instance on dispose.

    | Improve this Doc View Source

    Constructors


    RendererCoreBase()

    Initializes a new instance of the RendererBase class.

    protected RendererCoreBase()

    RendererCoreBase(String)

    Initializes a new instance of the ComponentBase class.

    protected RendererCoreBase(string name)
    Parameters
    Type Name Description
    System.String name

    The name attached to this component

    | Improve this Doc View Source

    Properties


    Content

    Gets the ContentManager.

    protected ContentManager Content { get; }
    Property Value
    Type Description
    ContentManager

    The asset manager.


    Context

    protected RenderContext Context { get; }
    Property Value
    Type Description
    RenderContext

    EffectSystem

    Gets the effect system.

    protected EffectSystem EffectSystem { get; }
    Property Value
    Type Description
    EffectSystem

    The effect system.


    Enabled

    Gets or sets a value indicating whether this is enabled.

    [DataMember(-20)]
    public virtual bool Enabled { get; set; }
    Property Value
    Type Description
    System.Boolean

    true if enabled; otherwise, false.


    GraphicsDevice

    Gets the graphics device.

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

    The graphics device.


    Initialized

    public bool Initialized { get; }
    Property Value
    Type Description
    System.Boolean

    Profiling

    public bool Profiling { get; set; }
    Property Value
    Type Description
    System.Boolean

    ProfilingKey

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

    Services

    Gets the IServiceRegistry.

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

    The service registry.

    | Improve this Doc View Source

    Methods


    CheckIsInDrawCore()

    Checks that the current execution path is between a PreDraw/PostDraw sequence and throws and exception if not.

    protected void CheckIsInDrawCore()

    Destroy()

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

    EnsureContext(RenderContext)

    protected void EnsureContext(RenderContext context)
    Parameters
    Type Name Description
    RenderContext context

    Initialize(RenderContext)

    public void Initialize(RenderContext context)
    Parameters
    Type Name Description
    RenderContext context

    InitializeCore()

    protected virtual void InitializeCore()

    NewScopedBuffer(BufferDescription, PixelFormat)

    Gets a render target with the specified description, scoped for the duration of the .

    protected Buffer NewScopedBuffer(BufferDescription description, PixelFormat viewFormat = PixelFormat.None)
    Parameters
    Type Name Description
    BufferDescription description

    The description of the buffer to allocate

    PixelFormat viewFormat

    The pixel format seen in shader

    Returns
    Type Description
    Buffer

    A new instance of texture.


    NewScopedTypedBuffer(Int32, PixelFormat, Boolean, GraphicsResourceUsage)

    Gets a render target with the specified description, scoped for the duration of the .

    protected Buffer NewScopedTypedBuffer(int count, PixelFormat viewFormat, bool isUnorderedAccess, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)
    Parameters
    Type Name Description
    System.Int32 count
    PixelFormat viewFormat
    System.Boolean isUnorderedAccess
    GraphicsResourceUsage usage
    Returns
    Type Description
    Buffer

    A new instance of texture.


    PostDrawCore(RenderDrawContext)

    protected virtual void PostDrawCore(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    PostDrawCoreInternal(RenderDrawContext)

    protected void PostDrawCoreInternal(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    PreDrawCore(RenderDrawContext)

    protected virtual void PreDrawCore(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    PreDrawCoreInternal(RenderDrawContext)

    protected void PreDrawCoreInternal(RenderDrawContext context)
    Parameters
    Type Name Description
    RenderDrawContext context

    PushScopedResource<T>(T)

    Pushes a new scoped resource to the current Draw.

    protected T PushScopedResource<T>(T resource)
        where T : GraphicsResource
    Parameters
    Type Name Description
    T resource

    The scoped resource

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    ToLoadAndUnload<T>(T)

    protected T ToLoadAndUnload<T>(T effect)
        where T : class, IGraphicsRendererCore
    Parameters
    Type Name Description
    T effect
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    Unload()

    Unloads this instance on dispose.

    protected virtual void Unload()

    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

    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