Class StreamingTexture
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
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
texture
The texture to stream.
protected Texture texture
Field Value
textureToSync
The texture to synchronize. Created and prepared in a background to be swapped with the streamed texture.
protected Texture textureToSync
Field Value
Properties
AllocatedResidency
Gets the allocated residency level.
public override int AllocatedResidency { get; }
Property Value
ArraySize
Gets the number of textures in an array.
public int ArraySize { get; }
Property Value
CurrentResidency
Gets the current residency level.
public override int CurrentResidency { get; }
Property Value
Description
Gets the texture image description (available in the storage container).
public ImageDescription Description { get; }
Property Value
Format
Gets the texture texels format
public PixelFormat Format { get; }
Property Value
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
Resource
Gets the resource object.
public override object Resource { get; }
Property Value
Texture
Gets the texture object.
public Texture Texture { get; }
Property Value
TotalHeight
Gets the height of maximum texture mip.
public int TotalHeight { get; }
Property Value
TotalMipLevels
Gets the total amount of mip levels.
public int TotalMipLevels { get; }
Property Value
TotalWidth
Gets the width of maximum texture mip.
public int TotalWidth { get; }
Property Value
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
intThe 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
StreamingQualityThe 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
intThe target residency.