[][src]Function fermium::renderer::SDL_RenderReadPixels

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

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 target
  • pixels A pointer to be filled in with the pixel data
  • pitch 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.