RendererCoreBase Class
Namespace: Stride.RenderingAssembly: Stride.Rendering.dll
Base implementation of IGraphicsRenderer
[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 |
|
| 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. |
|
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 |
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
[DataMember(-20)]
public virtual bool Enabled { get; set; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
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. |
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
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()