Function sdl2_sys::SDL_LockTextureToSurface
source · [−]pub unsafe extern "C" fn SDL_LockTextureToSurface(
texture: *mut SDL_Texture,
rect: *const SDL_Rect,
surface: *mut *mut SDL_Surface
) -> c_int
Expand description
\brief Lock a portion of the texture for write-only pixel access. Expose it as a SDL surface.
\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 surface This is filled in with a SDL surface representing the locked area Surface is freed internally after calling SDL_UnlockTexture or SDL_DestroyTexture.
\return 0 on success, or -1 if the texture is not valid or was not created with ::SDL_TEXTUREACCESS_STREAMING.
\sa SDL_UnlockTexture()