Function fermium::renderer::SDL_RenderReadPixels
source · pub unsafe extern "C" fn SDL_RenderReadPixels(
renderer: *mut SDL_Renderer,
rect: *const SDL_Rect,
format: u32,
pixels: *mut c_void,
pitch: c_int
) -> c_int
Expand description
Read pixels from the current rendering target.
renderer
The renderer from which pixels should be read.rect
A pointer to the rectangle to read, or NULL for the entire render target.format
The desired format of the pixel data, or 0 to use the format of the rendering targetpixels
A pointer to be filled in with the pixel datapitch
The pitch of the pixels parameter.
Returns: 0 on success, or -1 if pixel reading is not supported.
Warning: This is a very slow operation, and should not be used frequently.