Class RenderTask
Allows to perform custom rendering using graphics pipeline.
Namespace: FlaxEngine
Assembly: FlaxEngine.CSharp.dll
Syntax
[Unmanaged]
public class RenderTask : Object
  Constructors
RenderTask()
Fields
Tag
The custom tag object value linked to the rendering task.
Declaration
public object Tag
  Field Value
| 
        System.Object
         
  | 
    
Properties
CanDraw
Determines whether this task can be rendered.
Declaration
[Unmanaged]
public bool CanDraw { get; }
  Property Value
| 
        System.Boolean
         
  | 
    
Enabled
Gets or sets a value indicating whether task is enabled.
Declaration
[Unmanaged]
public bool Enabled { get; set; }
  Property Value
| 
        System.Boolean
         
  | 
    
FrameCount
The amount of frames rendered by this task. It is auto incremented on task drawing.
Declaration
[Unmanaged]
public int FrameCount { get; }
  Property Value
| 
        System.Int32
         
  | 
    
LastUsedFrame
The index of the frame when this task was last time rendered.
Declaration
[Unmanaged]
public ulong LastUsedFrame { get; }
  Property Value
| 
        System.UInt64
         
  | 
    
Order
The order of the task. Used for tasks rendering order. Lower first, higher later.
Declaration
[Unmanaged]
public int Order { get; set; }
  Property Value
| 
        System.Int32
         
  | 
    
Methods
OnDraw()
Called by graphics device to draw this task.
Declaration
[Unmanaged]
public virtual void OnDraw()
  Resize(Int32, Int32)
Changes the buffers and output size. Does nothing if size won't change. Called by window or user to resize rendering buffers.
Declaration
[Unmanaged]
public virtual bool Resize(int width, int height)
  Parameters
| 
        System.Int32
        width
         The width.  | 
    
| 
        System.Int32
        height
         The height.  | 
    
Returns
| 
        System.Boolean
         True if cannot resize the buffers.  | 
    
Events
Begin
Action fired on task rendering begin.
Declaration
[Unmanaged]
public event Action<RenderTask, GPUContext> Begin
  Event Type
| 
        System.Action<RenderTask, GPUContext>
         
  | 
    
End
Action fired on task rendering end.
Declaration
[Unmanaged]
public event Action<RenderTask, GPUContext> End
  Event Type
| 
        System.Action<RenderTask, GPUContext>
         
  | 
    
Present
Action fired just after frame present.
Declaration
[Unmanaged]
public event Action<RenderTask> Present
  Event Type
| 
        System.Action<RenderTask>
         
  | 
    
Render
Action fired on task rendering.
Declaration
[Unmanaged]
public event Action<RenderTask, GPUContext> Render
  Event Type
| 
        System.Action<RenderTask, GPUContext>
         
  |