Function fermium::renderer::SDL_UpdateTexture
source · pub unsafe extern "C" fn SDL_UpdateTexture(
texture: *mut SDL_Texture,
rect: *const SDL_Rect,
pixels: *const c_void,
pitch: c_int
) -> c_int
Expand description
Update the given texture rectangle with new pixel data.
texture
The texture to updaterect
A pointer to the rectangle of pixels to update, or NULL to update the entire texture.pixels
The raw pixel data in the format of the texture.pitch
The number of bytes in a row of pixel data, including padding between lines.
The pixel data must be in the format of the texture. The pixel format can
be queried with SDL_QueryTexture
.
Returns: 0 on success, or -1 if the texture is not valid.
This is a fairly slow function.