Function sdl2_sys::SDL_LockTexture

source ·
pub unsafe extern "C" fn SDL_LockTexture(
    texture: *mut SDL_Texture,
    rect: *const SDL_Rect,
    pixels: *mut *mut c_void,
    pitch: *mut c_int
) -> c_int
Expand description

\brief Lock a portion of the texture for write-only pixel access.

\param texture The texture to lock for access, which was created with ::SDL_TEXTUREACCESS_STREAMING. \param rect A pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked. \param pixels This is filled in with a pointer to the locked pixels, appropriately offset by the locked area. \param pitch This is filled in with the pitch of the locked pixels.

\return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.

\sa SDL_UnlockTexture()