Search Results for

    Show / Hide Table of Contents

    Class RenderTask

    Allows to perform custom rendering using graphics pipeline.

    Inheritance
    Object
    ScriptingObject
    RenderTask
    Inherited Members
    ScriptingObject::_gcHandle
    ScriptingObject::_id
    ScriptingObject::_type
    ScriptingObject::CanCast(const ScriptingTypeHandle& from, const ScriptingTypeHandle& to)
    ScriptingObject::CanCast(const MClass* from, const MClass* to)
    ScriptingObject::Cast(ScriptingObject* obj)
    ScriptingObject::ChangeID(const Guid& newId)
    ScriptingObject::CreateManaged()
    ScriptingObject::CreateManagedInternal()
    ScriptingObject::Deleted
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    ScriptingObject::DestroyManaged()
    Object::Flags
    ScriptingObject::FromInterface(void* interfaceObj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::FromInterface(T* interfaceObj)
    ScriptingObject::GetClass()
    ScriptingObject::GetID()
    ScriptingObject::GetManagedInstance()
    ScriptingObject::GetOrCreateManagedInstance()
    ScriptingObject::GetType()
    ScriptingObject::GetTypeHandle()
    ScriptingObject::HasManagedInstance()
    ScriptingObject::Is(const ScriptingTypeHandle& type)
    ScriptingObject::Is(const MClass* type)
    ScriptingObject::Is()
    ScriptingObject::IsRegistered()
    ScriptingObject::NewObject(const ScriptingTypeHandle& typeHandle)
    ScriptingObject::NewObject()
    ScriptingObject::OnDeleteObject()
    ScriptingObject::OnManagedInstanceDeleted()
    ScriptingObject::OnScriptingDispose()
    ScriptingObject::RegisterObject()
    ScriptingObject::ScriptingObject(const SpawnParams& params)
    ScriptingObject::SetManagedInstance(MObject* instance)
    RenderTask
    ScriptingObject::ToInterface(ScriptingObject* obj, const ScriptingTypeHandle& interfaceType)
    ScriptingObject::ToInterface(ScriptingObject* obj)
    ScriptingObject::ToManaged(const ScriptingObject* obj)
    ScriptingObject::ToNative(MObject* obj)
    ScriptingObject::ToString()
    ScriptingObject::UnregisterObject()
    Object::~Object()
    ScriptingObject::~ScriptingObject()
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/RenderTask.h
    Syntax
    public class RenderTask : public ScriptingObject

    Constructors

    ~RenderTask()

    Finalizes an instance of the RenderTask class.

    Declaration
    public virtual ~RenderTask()

    Fields

    Begin

    Action fired on task rendering begin.

    Declaration
    public Delegate<RenderTask* , GPUContext* > Begin
    Field Value
    Delegate<RenderTask , GPUContext >

    Enabled

    Gets or sets a value indicating whether task is enabled.

    Declaration
    public bool Enabled = true
    Field Value
    bool

    End

    Action fired on task rendering end.

    Declaration
    public Delegate<RenderTask* , GPUContext* > End
    Field Value
    Delegate<RenderTask , GPUContext >

    FrameCount

    The amount of frames rendered by this task. It is auto incremented on task drawing.

    Declaration
    public int32 FrameCount = 0
    Field Value
    int32

    LastUsedFrame

    The index of the frame when this task was last time rendered.

    Declaration
    public uint64 LastUsedFrame = 0
    Field Value
    uint64

    Order

    The order of the task. Used for tasks rendering order. Lower first, higher later.

    Declaration
    public int32 Order = 0
    Field Value
    int32

    Present

    Action fired just after frame present.

    Declaration
    public Delegate<RenderTask* > Present
    Field Value
    Delegate<RenderTask >

    Render

    Action fired on task rendering.

    Declaration
    public Delegate<RenderTask* , GPUContext* > Render
    Field Value
    Delegate<RenderTask , GPUContext >

    SwapChain

    The output window swap chain. Optional, used only when rendering to native window backbuffer.

    Declaration
    public GPUSwapChain* SwapChain = nullptr
    Field Value
    GPUSwapChain

    Methods

    CanDraw()

    Determines whether this task can be rendered.

    Declaration
    public virtual bool CanDraw() const
    Returns
    bool

    true if this task can be rendered; otherwise, false.

    OnBegin(GPUContext* context)

    Called on task rendering begin.

    Declaration
    public virtual void OnBegin(GPUContext* context)
    Parameters
    GPUContext context

    The GPU context.

    OnDraw()

    Called by graphics device to draw this task.

    Declaration
    public virtual void OnDraw()

    OnEnd(GPUContext* context)

    Called on task rendering end.

    Declaration
    public virtual void OnEnd(GPUContext* context)
    Parameters
    GPUContext context

    The GPU context.

    OnIdle()

    Called by graphics device to idle task that has not been selected for drawing this frame (CanDraw returned false). Can be used to recycle cached memory if task is idle for many frames in a row.

    Declaration
    public virtual void OnIdle()

    OnPresent(bool vsync)

    Presents frame to the output.

    Declaration
    public virtual void OnPresent(bool vsync)
    Parameters
    bool vsync

    True if use vertical synchronization to lock frame rate.

    OnRender(GPUContext* context)

    Called on task rendering.

    Declaration
    public virtual void OnRender(GPUContext* context)
    Parameters
    GPUContext context

    The GPU context.

    operator<(const RenderTask& other)

    Declaration
    public bool operator<(const RenderTask& other) const
    Parameters
    RenderTask other

    Returns
    bool

    Resize(int32 width, int32 height)

    Changes the buffers and output size. Does nothing if size won't change. Called by window or user to resize rendering buffers.

    Declaration
    public virtual bool Resize(int32 width, int32 height)
    Parameters
    int32 width

    The width.

    int32 height

    The height.

    Returns
    bool

    True if cannot resize the buffers.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat