Stride

OPEN / CLOSE
  • Features
  • Blog
  • Documentation
  • Community
(icon) Download

  • Discord
  • Facebook
  • Twitter
  • YouTube

LANGUAGE

OPEN / CLOSE
  • English
  • 日本語
    Show / Hide Table of Contents

    StreamingTexture Class

    Namespace: Stride.Streaming
    Assembly: Stride.Rendering.dll

    Texture streaming object.

    System.Object → DisposeBase → ComponentBase → StreamableResource → StreamingTexture
    Derived from StreamingTexture:

    public class StreamingTexture : StreamableResource, IDisposable, IComponent, IReferencable, ICollectorHolder
    Name Description
    Fields
    description

    The actual texture description.

    mipInfos

    The texture cached mip maps infos.

    residentMips

    The amount of the resident mips (uploaded to the GPU).

    texture

    The texture to stream.

    textureToSync

    The texture to synchronize. Created and prepared in a background to be swaped with the streamed texture. See Stride.Streaming.StreamingTexture.FlushSync.

    Properties
    AllocatedResidency

    Gets the allocated residency level.

    ArraySize

    Gets the number of textures in an array.

    CurrentResidency

    Gets the current residency level.

    Description

    Gets the texture image description (available in the storage container).

    Format

    Gets the texture texels format

    HighestResidentMipIndex

    Gets index of the highest resident mip map (may be equal to MipLevels if no mip has been uploaded). Note: mip=0 is the highest (top quality)

    IsCubeMap

    Gets a value indicating whether this texture is a cube map.

    MaxResidency

    Gets the maximum residency level.

    Resource

    Gets the resource object.

    Texture

    Gets the texture object.

    TotalHeight

    Gets the height of maximum texture mip.

    TotalMipLevels

    Gets the total amount of mip levels.

    TotalWidth

    Gets the width of maximum texture mip.

    Methods
    CalculateRequestedResidency(Int32)

    Calculates the requested residency level for this resource based on a given target residency. Resource can control how to change it's residency up/down and if do it at once or in steps, etc.. This gives more control over per resource streaming.

    CalculateTargetResidency(StreamingQuality)

    Calculates the target residency level for this resource based on a given uniform quality.

    Destroy()

    Disposes of object resources.

    StreamAsync(Int32)

    Stream resource to the target residency level.

    | Improve this Doc View Source

    Fields


    description

    The actual texture description.

    protected ImageDescription description
    Field Value
    Type Description
    ImageDescription

    mipInfos

    The texture cached mip maps infos.

    protected StreamingTexture.MipInfo[] mipInfos
    Field Value
    Type Description
    StreamingTexture.MipInfo[]

    residentMips

    The amount of the resident mips (uploaded to the GPU).

    protected int residentMips
    Field Value
    Type Description
    System.Int32

    texture

    The texture to stream.

    protected Texture texture
    Field Value
    Type Description
    Texture

    textureToSync

    The texture to synchronize. Created and prepared in a background to be swaped with the streamed texture. See Stride.Streaming.StreamingTexture.FlushSync.

    protected Texture textureToSync
    Field Value
    Type Description
    Texture
    | Improve this Doc View Source

    Properties


    AllocatedResidency

    Gets the allocated residency level.

    public override int AllocatedResidency { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    StreamableResource.AllocatedResidency

    ArraySize

    Gets the number of textures in an array.

    public int ArraySize { get; }
    Property Value
    Type Description
    System.Int32

    CurrentResidency

    Gets the current residency level.

    public override int CurrentResidency { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    StreamableResource.CurrentResidency

    Description

    Gets the texture image description (available in the storage container).

    public ImageDescription Description { get; }
    Property Value
    Type Description
    ImageDescription

    Format

    Gets the texture texels format

    public PixelFormat Format { get; }
    Property Value
    Type Description
    PixelFormat

    HighestResidentMipIndex

    Gets index of the highest resident mip map (may be equal to MipLevels if no mip has been uploaded). Note: mip=0 is the highest (top quality)

    public int HighestResidentMipIndex { get; }
    Property Value
    Type Description
    System.Int32

    Mip index


    IsCubeMap

    Gets a value indicating whether this texture is a cube map.

    public bool IsCubeMap { get; }
    Property Value
    Type Description
    System.Boolean

    true if this texture is a cube map; otherwise, false.


    MaxResidency

    Gets the maximum residency level.

    public override int MaxResidency { get; }
    Property Value
    Type Description
    System.Int32
    Overrides
    StreamableResource.MaxResidency

    Resource

    Gets the resource object.

    public override object Resource { get; }
    Property Value
    Type Description
    System.Object
    Overrides
    StreamableResource.Resource

    Texture

    Gets the texture object.

    public Texture Texture { get; }
    Property Value
    Type Description
    Texture

    TotalHeight

    Gets the height of maximum texture mip.

    public int TotalHeight { get; }
    Property Value
    Type Description
    System.Int32

    TotalMipLevels

    Gets the total amount of mip levels.

    public int TotalMipLevels { get; }
    Property Value
    Type Description
    System.Int32

    TotalWidth

    Gets the width of maximum texture mip.

    public int TotalWidth { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    Methods


    CalculateRequestedResidency(Int32)

    Calculates the requested residency level for this resource based on a given target residency. Resource can control how to change it's residency up/down and if do it at once or in steps, etc.. This gives more control over per resource streaming.

    public override int CalculateRequestedResidency(int targetResidency)
    Parameters
    Type Name Description
    System.Int32 targetResidency

    The target residency.

    Returns
    Type Description
    System.Int32

    Requested residency.

    Overrides
    StreamableResource.CalculateRequestedResidency(Int32)

    CalculateTargetResidency(StreamingQuality)

    Calculates the target residency level for this resource based on a given uniform quality.

    public override int CalculateTargetResidency(StreamingQuality quality)
    Parameters
    Type Name Description
    StreamingQuality quality

    The quality.

    Returns
    Type Description
    System.Int32

    Target residency.

    Overrides
    StreamableResource.CalculateTargetResidency(StreamingQuality)

    Destroy()

    Disposes of object resources.

    protected override void Destroy()
    Overrides
    StreamableResource.Destroy()

    StreamAsync(Int32)

    Stream resource to the target residency level.

    protected override Task StreamAsync(int residency)
    Parameters
    Type Name Description
    System.Int32 residency

    The target residency.

    Returns
    Type Description
    System.Threading.Tasks.Task
    Overrides
    StreamableResource.StreamAsync(Int32)

    Inherited Members

    StreamableResource.fileProvider
    StreamableResource.cancellationToken
    StreamableResource.Manager
    StreamableResource.Storage
    StreamableResource.TargetResidency
    StreamableResource.IsAllocated
    StreamableResource.StreamingOptions
    StreamableResource.Init(IDatabaseFileProviderService, ContentStorage)
    StreamableResource.StopStreaming()
    ComponentBase.Tags
    ComponentBase.Name
    ComponentBase.ICollectorHolder.Collector
    ComponentBase.OnNameChanged()
    ComponentBase.ToString()
    DisposeBase.Dispose()
    DisposeBase.IsDisposed
    DisposeBase.IReferencable.ReferenceCount
    DisposeBase.IReferencable.AddReference()
    DisposeBase.IReferencable.Release()
    DisposeBase.OnAddReference()
    DisposeBase.OnReleaseReference()

    Extension Methods

    ComponentBaseExtensions.DisposeBy<T>(T, ICollectorHolder)
    ComponentBaseExtensions.RemoveDisposeBy<T>(T, ICollectorHolder)
    • Improve this Doc
    • View Source
    In This Article

    Back to top

    Copyright © 2019-2021 .NET Foundation and Contributors
    Supported by the .NET Foundation