Class RendererCoreBase
Base implementation of IGraphics
[DataContract]
public abstract class RendererCoreBase : ComponentBase, IComponent, IReferencable, ICollectorHolder, IGraphicsRendererCore, IDisposable
- Inheritance
-
Renderer
Core Base
- Implements
- Derived
- Inherited Members
- Extension Methods
Constructors
RendererCoreBase()
Initializes a new instance of the Renderer
RendererCoreBase(string)
Initializes a new instance of the Component
Parameters
name
stringThe name attached to this component
Properties
CPUProfilingKey
Property Value
Content
Gets the Content
Property Value
- Content
Manager The asset manager.
Context
Property Value
EffectSystem
Gets the effect system.
Property Value
- Effect
System The effect system.
Enabled
Gets or sets a value indicating whether this EntityComponentRendererBase is enabled.
Property Value
- bool
true
if enabled; otherwise,false
.
GPUProfilingKey
Property Value
GraphicsDevice
Gets the graphics device.
Property Value
- Graphics
Device The graphics device.
Initialized
Gets a value indicating whether this renderer is initialized.
Property Value
Profiling
Property Value
Services
Gets the IService
Property Value
- IService
Registry The service registry.
Methods
CheckIsInDrawCore()
Checks that the current execution path is between a PreDraw/PostDraw sequence and throws and exception if not.
Destroy()
Disposes of object resources.
EnsureContext(RenderContext)
Parameters
context
RenderContext
Initialize(RenderContext)
Loads this renderer. See remarks.
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()
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
intviewFormat
PixelFormat isUnorderedAccess
boolusage
GraphicsResource Usage
Returns
- Buffer
A new instance of texture.
PostDrawCore(RenderDrawContext)
Parameters
context
RenderDraw Context
PostDrawCoreInternal(RenderDrawContext)
Parameters
context
RenderDraw Context
PreDrawCore(RenderDrawContext)
Parameters
context
RenderDraw Context
PreDrawCoreInternal(RenderDrawContext)
Parameters
context
RenderDraw Context
PushScopedResource<T>(T)
Pushes a new scoped resource to the current Draw.
Parameters
resource
TThe scoped resource
Returns
- T
Type Parameters
T
ToLoadAndUnload<T>(T)
Parameters
effect
T
Returns
- T
Type Parameters
T
Unload()
Unloads this instance on dispose.