Search Results for

    Show / Hide Table of Contents

    Class StreamingTexture

    GPU texture object which can change it's resolution (quality) at runtime.

    Inheritance
    Object
    StreamingTexture
    Inherited Members
    StreamableResource::_group
    StreamableResource::_isDynamic
    StreamableResource::_isStreaming
    StreamableResource::_streamingQuality
    Object::DeleteObject(float timeToLive = 0.0f, bool useGameTime=false)
    Object::DeleteObjectNow()
    Object::Flags
    StreamableResource::GetGroup()
    StreamableResource::GetStreamingQuality()
    StreamableResource::GetTargetResidency()
    StreamableResource::IsAllocated()
    StreamableResource::IsDynamic()
    Object::OnDeleteObject()
    StreamableResource::RequestStreamingUpdate()
    StreamableResource::ResetStreaming(bool error=true)
    StreamableResource::ResidencyChanged
    StreamableResource::StartStreaming(bool isDynamic)
    StreamableResource::StopStreaming()
    StreamableResource::StreamableResource(StreamingGroup* group)
    StreamableResource::Streaming
    Object::~Object()
    StreamableResource::~StreamableResource()
    Assembly: FlaxEngine.dll
    File: Engine/Graphics/Textures/StreamingTexture.h
    Syntax
    public class StreamingTexture : public Object, public StreamableResource

    Constructors

    ~StreamingTexture()

    Declaration
    public ~StreamingTexture()

    StreamingTexture(ITextureOwner* owner, const String& name)

    Declaration
    public StreamingTexture(ITextureOwner* owner, const String& name)
    Parameters
    ITextureOwner owner

    String name

    Fields

    _header

    Declaration
    protected TextureHeader _header
    Field Value
    TextureHeader

    _isBlockCompressed

    Declaration
    protected bool _isBlockCompressed
    Field Value
    bool

    _minMipCountBlockCompressed

    Declaration
    protected int32 _minMipCountBlockCompressed
    Field Value
    int32

    _owner

    Declaration
    protected ITextureOwner* _owner
    Field Value
    ITextureOwner

    _streamingTasks

    Declaration
    protected Array<Task* , FixedAllocation<16>> _streamingTasks
    Field Value
    Array<Task , FixedAllocation<16>>

    _texture

    Declaration
    protected GPUTexture* _texture
    Field Value
    GPUTexture

    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 override
    Returns
    bool

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

    Overrides
    StreamableResource::CanBeUpdated()

    CancelStreamingTasks()

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

    Declaration
    public virtual void CancelStreamingTasks() override
    Overrides
    StreamableResource::CancelStreamingTasks()

    Create(const TextureHeader& header)

    Creates new texture

    Declaration
    public bool Create(const TextureHeader& header)
    Parameters
    TextureHeader header

    Texture header

    Returns
    bool

    True if cannot create texture, otherwise false

    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) override
    Parameters
    int32 residency

    The target residency.

    Returns
    Task

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

    Overrides
    StreamableResource::CreateStreamingTask(int32 residency)

    GetAllocatedResidency()

    Gets resource allocated residency level.

    Declaration
    public virtual int32 GetAllocatedResidency() const override
    Returns
    int32

    Overrides
    StreamableResource::GetAllocatedResidency()

    GetCurrentResidency()

    Gets resource current residency level.

    Declaration
    public virtual int32 GetCurrentResidency() const override
    Returns
    int32

    Overrides
    StreamableResource::GetCurrentResidency()

    GetFormatType()

    Returns texture format type

    Declaration
    public TextureFormatType GetFormatType() const
    Returns
    TextureFormatType

    GetHeader()

    Gets the texture header.

    Declaration
    public TextureHeader* GetHeader() const
    Returns
    TextureHeader

    GetMaxResidency()

    Gets resource maximum residency level.

    Declaration
    public virtual int32 GetMaxResidency() const override
    Returns
    int32

    Overrides
    StreamableResource::GetMaxResidency()

    GetOwner()

    Gets the owner.

    Declaration
    public ITextureOwner* GetOwner() const
    Returns
    ITextureOwner

    GetTexture()

    Gets texture object handle.

    Declaration
    public GPUTexture* GetTexture() const
    Returns
    GPUTexture

    GetTotalMemoryUsage()

    Gets the total memory usage that texture may have in use (if loaded to the maximum quality). Exact value may differ due to memory alignment and resource allocation policy.

    Declaration
    public uint64 GetTotalMemoryUsage() const
    Returns
    uint64

    The amount of bytes.

    IsCubeMap()

    Returns true if it's a cube map texture

    Declaration
    public bool IsCubeMap() const
    Returns
    bool

    IsInitialized()

    Gets a value indicating whether this instance is initialized.

    Declaration
    public bool IsInitialized() const
    Returns
    bool

    NeverStream()

    Returns true if texture cannot be used during GPU resources streaming system

    Declaration
    public bool NeverStream() const
    Returns
    bool

    operator->()

    Declaration
    public GPUTexture* operator->() const
    Returns
    GPUTexture

    Size()

    Gets texture size of Float2::Zero if not loaded.

    Declaration
    public Float2 Size() const
    Returns
    Float2

    TextureMipIndexToTotalIndex(int32 textureMipIndex)

    Converts allocated texture mip index to the absolute mip map index.

    Declaration
    public int32 TextureMipIndexToTotalIndex(int32 textureMipIndex) const
    Parameters
    int32 textureMipIndex

    Index of the texture mip.

    Returns
    int32

    The index of the mip map.

    ToString()

    Gets the string representation of this object.

    Declaration
    public virtual String ToString() const override
    Returns
    String

    Overrides
    Object::ToString()

    TotalArraySize()

    Gets total texture array size

    Declaration
    public int32 TotalArraySize() const
    Returns
    int32

    TotalHeight()

    Gets total texture height (in texels)

    Declaration
    public int32 TotalHeight() const
    Returns
    int32

    TotalIndexToTextureMipIndex(int32 mipIndex)

    Converts absolute mip map index to the allocated texture mip index.

    Declaration
    public int32 TotalIndexToTextureMipIndex(int32 mipIndex) const
    Parameters
    int32 mipIndex

    Index of the texture mip.

    Returns
    int32

    The index of the mip map.

    TotalMipLevels()

    Gets total texture mip levels count

    Declaration
    public int32 TotalMipLevels() const
    Returns
    int32

    TotalWidth()

    Gets total texture width (in texels)

    Declaration
    public int32 TotalWidth() const
    Returns
    int32

    UnloadTexture()

    Release texture

    Declaration
    public void UnloadTexture()

    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) override
    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.

    Overrides
    StreamableResource::UpdateAllocation(int32 residency)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat