Function sdl2_sys::SDL_UpdateTexture [] [src]

pub unsafe extern "C" fn SDL_UpdateTexture(
    texture: *mut SDL_Texture,
    rect: *const SDL_Rect,
    pixels: *const c_void,
    pitch: c_int
) -> c_int

\brief Update the given texture rectangle with new pixel data.

\param texture The texture to update \param rect A pointer to the rectangle of pixels to update, or NULL to update the entire texture. \param pixels The raw pixel data. \param pitch The number of bytes in a row of pixel data, including padding between lines.

\return 0 on success, or -1 if the texture is not valid.

\note This is a fairly slow function.