StreamingTexture Class
Namespace: Stride.StreamingAssembly: Stride.Rendering.dll
Texture streaming object.
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. |
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 |
Properties
AllocatedResidency
Gets the allocated residency level.
public override int AllocatedResidency { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
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
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 |
|
MaxResidency
Gets the maximum residency level.
public override int MaxResidency { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Overrides
Resource
Gets the resource object.
public override object Resource { get; }
Property Value
Type | Description |
---|---|
System.Object |
Overrides
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 |
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
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
Destroy()
Disposes of object resources.
protected override void Destroy()
Overrides
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 |