Search Results for

    Show / Hide Table of Contents

    Class StreamableResource

    Base class for all resource types that can be dynamically streamed.

    Inheritance
    StreamableResource
    Assembly: FlaxEngine.dll
    File: Engine/Streaming/StreamableResource.h
    Syntax
    public class StreamableResource

    Constructors

    ~StreamableResource()

    Declaration
    protected ~StreamableResource()

    StreamableResource(StreamingGroup* group)

    Declaration
    protected StreamableResource(StreamingGroup* group)
    Parameters
    StreamingGroup group

    Fields

    _group

    Declaration
    protected StreamingGroup* _group
    Field Value
    StreamingGroup

    _isDynamic

    Declaration
    protected bool _isDynamic
    Field Value
    bool

    _isStreaming

    Declaration
    protected bool _isStreaming
    Field Value
    bool

    _streamingQuality

    Declaration
    protected float _streamingQuality
    Field Value
    float

    ResidencyChanged

    Event called when current resource residency gets changed (eg. model LOD or texture MIP gets loaded). Usually called from async thread.

    Declaration
    public Action ResidencyChanged
    Field Value
    Action

    Streaming

    Declaration
    public StreamingCache Streaming
    Field Value
    StreamingCache

    Methods

    CanBeUpdated()

    Determines whether this instance can be updated. Which means: no async streaming, no pending action in background.

    Declaration
    public virtual bool CanBeUpdated() const = 0
    Returns
    bool

    true if this instance can be updated; otherwise, false.

    CancelStreamingTasks()

    Cancels any streaming task (or tasks sequence) started for this resource.

    Declaration
    public virtual void CancelStreamingTasks() = 0

    CreateStreamingTask(int32 residency)

    Creates streaming task (or tasks sequence) to perform resource streaming for the desire residency level.

    Declaration
    public virtual Task* CreateStreamingTask(int32 residency) = 0
    Parameters
    int32 residency

    The target residency.

    Returns
    Task

    Async task or tasks that update resource residency level. Must be preceded with UpdateAllocation call.

    GetAllocatedResidency()

    Gets resource allocated residency level.

    Declaration
    public virtual int32 GetAllocatedResidency() const = 0
    Returns
    int32

    GetCurrentResidency()

    Gets resource current residency level.

    Declaration
    public virtual int32 GetCurrentResidency() const = 0
    Returns
    int32

    GetGroup()

    Gets resource group.

    Declaration
    public StreamingGroup* GetGroup() const
    Returns
    StreamingGroup

    GetMaxResidency()

    Gets resource maximum residency level.

    Declaration
    public virtual int32 GetMaxResidency() const = 0
    Returns
    int32

    GetStreamingQuality()

    Gets resource streaming quality level

    Declaration
    public float GetStreamingQuality() const
    Returns
    float

    GetTargetResidency()

    Gets resource target residency level.

    Declaration
    public int32 GetTargetResidency() const
    Returns
    int32

    IsAllocated()

    Gets a value indicating whether this resource has been allocated.

    Declaration
    public bool IsAllocated() const
    Returns
    bool

    IsDynamic()

    Gets value indicating whenever resource can be used in dynamic streaming (otherwise use always the best quality).

    Declaration
    public bool IsDynamic() const
    Returns
    bool

    RequestStreamingUpdate()

    Requests the streaming update for this resource during next streaming manager update.

    Declaration
    public void RequestStreamingUpdate()

    ResetStreaming(bool error=true)

    Stops the streaming (eg. on streaming fail).

    Declaration
    public void ResetStreaming(bool error=true)
    Parameters
    bool error

    True if streaming failed.

    StartStreaming(bool isDynamic)

    Declaration
    protected void StartStreaming(bool isDynamic)
    Parameters
    bool isDynamic

    StopStreaming()

    Declaration
    protected void StopStreaming()

    UpdateAllocation(int32 residency)

    Updates the resource allocation to the given residency level. May not be updated now but in an async operation.

    Declaration
    public virtual Task* UpdateAllocation(int32 residency) = 0
    Parameters
    int32 residency

    The target allocation residency.

    Returns
    Task

    Async task that updates resource allocation or null if already done it. Warning: need to call task start to perform allocation.

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