GraphicsAPI reference
Class ReadbackRequest
Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device
An asynchronous read of a render target region, completed by a fence. The data are the pixels of every command list submitted before ReadPixels: rows top to bottom, tightly packed, in the target’s colour format.
public abstract class ReadbackRequestInheritance
Derived
Constructors
ReadbackRequest(RectI, TextureFormat)
Creates the request.
protected ReadbackRequest(RectI region, TextureFormat format)Parameters
region RectI
format TextureFormat
Properties
Format
The pixel format of Pixels.
public TextureFormat Format { get; }Property Value
IsCompleted
True once the GPU finished the copy (polls the fence; never blocks).
public abstract bool IsCompleted { get; }Property Value
Pixels
The pixels; InvalidOperationException before IsCompleted.
public ReadOnlySpan<byte> Pixels { get; }Property Value
Region
The region read.
public RectI Region { get; }Property Value
Methods
Collect()
Backend: copies the completed data out and releases the staging memory (called once).
protected abstract byte[] Collect()Returns
byte[]
Wait()
Blocks until the copy finished.
public abstract void Wait()