Simp module

pixel_read_begin

procedure · 1 overloadSource

Starts copying the pixels of source back to the CPU without waiting for them. Poll with pixel_read_is_done, then collect them with pixel_read_end.

pixel_read_begin :: (
    source: *Texture,
    dest_format: Texture_Format,
    width: s32 = -1,
    height: s32 = -1,
    srgb := false,
    flip := false
) -> *Pixel_Read

Starts copying the pixels of source back to the CPU without waiting for them. Poll with pixel_read_is_done, then collect them with pixel_read_end.

Parameters

source: *Texture
the render target to read.
dest_format: Texture_Format
the format of the pixels you get back.
width: s32
size of the result in pixels; source is scaled to fit. -1 keeps the size of source.
height: s32
size of the result in pixels. -1 keeps the size of source.
srgb := false
treats the result as sRGB-encoded.
flip := false
reverses the order of the rows, so the top row comes first.

Returns

See also