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.
- source: the render target to read.
- dest_format: the format of the pixels you get back.
- width: size of the result in pixels;
sourceis scaled to fit. -1 keeps the size ofsource. - height: size of the result in pixels. -1 keeps the size of
source. - srgb: treats the result as sRGB-encoded.
- flip: reverses the order of the rows, so the top row comes first.
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;
sourceis scaled to fit. -1 keeps the size ofsource. - 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.