Function fermium::renderer::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
Lock a portion of the texture for write-only pixel access. Expose it as a SDL surface.
texture
The texture to lock for access, which was created withSDL_TEXTUREACCESS_STREAMING
.rect
A pointer to the rectangle to lock for access. If the rect isNULL
, the entire texture will be locked.surface
This is filled in with a SDL surface representing the locked area Surface is freed internally after callingSDL_UnlockTexture
orSDL_DestroyTexture
.
Returns: 0 on success, or -1 if the texture is not valid or was not
created with SDL_TEXTUREACCESS_STREAMING
.
See Also: SDL_UnlockTexture