[][src]Function fermium::renderer::SDL_LockTextureToSurface

pub unsafe extern "C" fn SDL_LockTextureToSurface(
    texture: *mut SDL_Texture,
    rect: *const SDL_Rect,
    surface: *mut *mut SDL_Surface
) -> c_int

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 with SDL_TEXTUREACCESS_STREAMING.
  • rect A pointer to the rectangle to lock for access. If the rect is NULL, the entire texture will be locked.
  • surface This is filled in with a SDL surface representing the locked area Surface is freed internally after calling SDL_UnlockTexture or SDL_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