RenderContext Class
Namespace: Stride.RenderingAssembly: Stride.Rendering.dll
Rendering context.
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 |
|
| 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. |
|
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 |
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
public VisibilityGroup VisibilityGroup { get; set; }
Property Value
| Type | Description |
|---|---|
| VisibilityGroup |
Methods
Destroy()
protected override void Destroy()
Overrides
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 |
Events
RendererInitialized
Occurs when a renderer is initialized.
public event Action<IGraphicsRendererCore> RendererInitialized
Event Type
| Type | Description |
|---|---|
| System.Action<IGraphicsRendererCore> |