public sealed class AssetTextureStreamSourceA ITextureStreamSource over content: byte ranges out of shipped bundles.
Remarks
The join AssetTextureSource is the one-shot half of. That one reads a whole Texture artefact and decodes it; this one reads a range of the same artefact and decodes nothing, because a page is bytes the device wants as they are.
⚠ A stream per read, not a stream per texture. Pages of one texture are read concurrently on the thread pool, and a shared stream has a position two of them would fight over — the resulting bug is a page holding another page's bytes, which looks like a corrupt texture rather than like a race. Opening is a catalog lookup and a slice of an already-mapped bundle, so the cost of doing it per page is not the cost it looks like.
Methods (3)
public AssetTextureStreamSource(AssetManager assets)Creates a source over a content manager.
public void Register(int texture, string address)Says which address a texture number reads from.
public ValueTask<int> ReadAsync(int texture, long offset, Memory<byte> destination, CancellationToken cancellation)Reads a range of one texture's file.
Used by (1)
- AssetTextureSourceVixen.Engine.Renderer