Table of Contents

Class StreamingTexture

Namespace
Stride.Streaming
Assembly
Stride.Rendering.dll

Texture streaming object.

public class StreamingTexture : StreamableResource, IDisposable, IComponent, IReferencable, ICollectorHolder
Inheritance
StreamingTexture
Implements
Inherited Members
Extension Methods

Fields

description

The actual texture description.

protected ImageDescription description

Field Value

ImageDescription

mipInfos

The texture cached mip maps infos.

protected StreamingTexture.MipInfo[] mipInfos

Field Value

MipInfo[]

residentMips

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

protected int residentMips

Field Value

int

texture

The texture to stream.

protected Texture texture

Field Value

Texture

textureToSync

The texture to synchronize. Created and prepared in a background to be swapped with the streamed texture.

protected Texture textureToSync

Field Value

Texture

Properties

AllocatedResidency

Gets the allocated residency level.

public override int AllocatedResidency { get; }

Property Value

int

ArraySize

Gets the number of textures in an array.

public int ArraySize { get; }

Property Value

int

CurrentResidency

Gets the current residency level.

public override int CurrentResidency { get; }

Property Value

int

Description

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

public ImageDescription Description { get; }

Property Value

ImageDescription

Format

Gets the texture texels format

public PixelFormat Format { get; }

Property Value

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

int

Mip index

IsCubeMap

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

public bool IsCubeMap { get; }

Property Value

bool

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

MaxResidency

Gets the maximum residency level.

public override int MaxResidency { get; }

Property Value

int

Resource

Gets the resource object.

public override object Resource { get; }

Property Value

object

Texture

Gets the texture object.

public Texture Texture { get; }

Property Value

Texture

TotalHeight

Gets the height of maximum texture mip.

public int TotalHeight { get; }

Property Value

int

TotalMipLevels

Gets the total amount of mip levels.

public int TotalMipLevels { get; }

Property Value

int

TotalWidth

Gets the width of maximum texture mip.

public int TotalWidth { get; }

Property Value

int

Methods

CalculateRequestedResidency(int)

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

targetResidency int

The target residency.

Returns

int

Requested residency.

CalculateTargetResidency(StreamingQuality)

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

public override int CalculateTargetResidency(StreamingQuality quality)

Parameters

quality StreamingQuality

The quality.

Returns

int

Target residency.

Destroy()

Disposes of object resources.

protected override void Destroy()

StreamAsync(int)

Stream resource to the target residency level.

protected override Task StreamAsync(int residency)

Parameters

residency int

The target residency.

Returns

Task