RenderDrawContext Class
Namespace: Stride.RenderingAssembly: Stride.Rendering.dll
Rendering context used during
Derived from RenderDrawContext:
public sealed class RenderDrawContext : ComponentBase, IDisposable, IComponent, IReferencable, ICollectorHolder
Name | Description | |
---|---|---|
Constructors | ||
RenderDrawContext(IServiceRegistry, RenderContext, GraphicsContext) | ||
Properties | ||
CommandList | Gets the command list. |
|
GraphicsContext | ||
GraphicsDevice | ||
QueryManager | ||
RenderContext | Gets the render context. |
|
Resolver | ||
ResourceGroupAllocator | Gets the ResourceGroup allocator. |
|
Methods | ||
GetSharedEffect<T>() | Gets or creates a shared effect. |
|
LockCommandList() | Locks the command list until System.IDisposable.Dispose() is called on the returned value type. |
|
PopRenderTargets() | Restores render targets and viewport state. |
|
PushRenderTargetsAndRestore() | Pushes render targets and viewport state. |
Constructors
RenderDrawContext(IServiceRegistry, RenderContext, GraphicsContext)
public RenderDrawContext(IServiceRegistry services, RenderContext renderContext, GraphicsContext graphicsContext)
Parameters
Type | Name | Description |
---|---|---|
IServiceRegistry | services | |
RenderContext | renderContext | |
GraphicsContext | graphicsContext |
Properties
CommandList
Gets the command list.
public CommandList CommandList { get; }
Property Value
Type | Description |
---|---|
CommandList |
GraphicsContext
public GraphicsContext GraphicsContext { get; }
Property Value
Type | Description |
---|---|
GraphicsContext |
GraphicsDevice
public GraphicsDevice GraphicsDevice { get; }
Property Value
Type | Description |
---|---|
GraphicsDevice |
QueryManager
public QueryManager QueryManager { get; }
Property Value
Type | Description |
---|---|
QueryManager |
RenderContext
Gets the render context.
public RenderContext RenderContext { get; }
Property Value
Type | Description |
---|---|
RenderContext |
Resolver
public ResourceResolver Resolver { get; }
Property Value
Type | Description |
---|---|
ResourceResolver |
ResourceGroupAllocator
Gets the ResourceGroup allocator.
public ResourceGroupAllocator ResourceGroupAllocator { get; }
Property Value
Type | Description |
---|---|
ResourceGroupAllocator |
Methods
GetSharedEffect<T>()
Gets or creates a shared effect.
public T GetSharedEffect<T>()
where T : DrawEffect, new()
Returns
Type | Description |
---|---|
T | A singleton instance of |
Type Parameters
Name | Description |
---|---|
T | Type of the shared effect (mush have a constructor taking a RenderContext |
LockCommandList()
Locks the command list until System.IDisposable.Dispose() is called on the returned value type.
public DefaultCommandListLock LockCommandList()
Returns
Type | Description |
---|---|
DefaultCommandListLock |
PopRenderTargets()
Restores render targets and viewport state.
public void PopRenderTargets()
PushRenderTargetsAndRestore()
Pushes render targets and viewport state.
public RenderDrawContext.RenderTargetRestore PushRenderTargetsAndRestore()
Returns
Type | Description |
---|---|
RenderDrawContext.RenderTargetRestore |