Table of Contents

Class RendererCoreBase

Namespace
Stride.Rendering
Assembly
Stride.Rendering.dll

Base implementation of IGraphicsRenderer

[DataContract]
public abstract class RendererCoreBase : ComponentBase, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
Inheritance
RendererCoreBase
Implements
Derived
Inherited Members
Extension Methods

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

name string

The name attached to this component

Properties

CPUProfilingKey

public ProfilingKey CPUProfilingKey { get; }

Property Value

ProfilingKey

Content

Gets the ContentManager.

protected ContentManager Content { get; }

Property Value

ContentManager

The asset manager.

Context

protected RenderContext Context { get; }

Property Value

RenderContext

EffectSystem

Gets the effect system.

protected EffectSystem EffectSystem { get; }

Property Value

EffectSystem

The effect system.

Enabled

Gets or sets a value indicating whether this EntityComponentRendererBase is enabled.

[DataMember(-20)]
public virtual bool Enabled { get; set; }

Property Value

bool

true if enabled; otherwise, false.

GPUProfilingKey

public ProfilingKey GPUProfilingKey { get; }

Property Value

ProfilingKey

GraphicsDevice

Gets the graphics device.

protected GraphicsDevice GraphicsDevice { get; }

Property Value

GraphicsDevice

The graphics device.

Initialized

Gets a value indicating whether this renderer is initialized.

public bool Initialized { get; }

Property Value

bool

Profiling

public bool Profiling { get; set; }

Property Value

bool

Services

Gets the IServiceRegistry.

protected IServiceRegistry Services { get; }

Property Value

IServiceRegistry

The service registry.

Methods

CheckIsInDrawCore()

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

protected void CheckIsInDrawCore()

Destroy()

Disposes of object resources.

protected override void Destroy()

EnsureContext(RenderContext)

protected void EnsureContext(RenderContext context)

Parameters

context RenderContext

Initialize(RenderContext)

Loads this renderer. See remarks.

public void Initialize(RenderContext context)

Parameters

context RenderContext

The context.

Remarks

This method allow a renderer to prepare for rendering. This method should be called once to initialize a renderer.

InitializeCore()

protected virtual void InitializeCore()

NewScopedBuffer(BufferDescription, PixelFormat)

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

protected Buffer NewScopedBuffer(BufferDescription description, PixelFormat viewFormat = PixelFormat.None)

Parameters

description BufferDescription

The description of the buffer to allocate

viewFormat PixelFormat

The pixel format seen in shader

Returns

Buffer

A new instance of texture.

NewScopedTypedBuffer(int, PixelFormat, bool, GraphicsResourceUsage)

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

protected Buffer NewScopedTypedBuffer(int count, PixelFormat viewFormat, bool isUnorderedAccess, GraphicsResourceUsage usage = GraphicsResourceUsage.Default)

Parameters

count int
viewFormat PixelFormat
isUnorderedAccess bool
usage GraphicsResourceUsage

Returns

Buffer

A new instance of texture.

PostDrawCore(RenderDrawContext)

protected virtual void PostDrawCore(RenderDrawContext context)

Parameters

context RenderDrawContext

PostDrawCoreInternal(RenderDrawContext)

protected void PostDrawCoreInternal(RenderDrawContext context)

Parameters

context RenderDrawContext

PreDrawCore(RenderDrawContext)

protected virtual void PreDrawCore(RenderDrawContext context)

Parameters

context RenderDrawContext

PreDrawCoreInternal(RenderDrawContext)

protected void PreDrawCoreInternal(RenderDrawContext context)

Parameters

context RenderDrawContext

PushScopedResource<T>(T)

Pushes a new scoped resource to the current Draw.

protected T PushScopedResource<T>(T resource) where T : GraphicsResource

Parameters

resource T

The scoped resource

Returns

T

Type Parameters

T

ToLoadAndUnload<T>(T)

protected T ToLoadAndUnload<T>(T effect) where T : class, IGraphicsRendererCore

Parameters

effect T

Returns

T

Type Parameters

T

Unload()

Unloads this instance on dispose.

protected virtual void Unload()