Function SDL_DuplicateSurface
pub unsafe extern "C" fn SDL_DuplicateSurface(
surface: *mut SDL_Surface,
) -> *mut SDL_Surface
Available on crate feature
dep_sdl3
only.Expand description
Creates a new surface identical to the existing surface.
If the original surface has alternate images, the new surface will have a reference to them as well.
The returned surface should be freed with SDL_DestroySurface()
.
§Parameters
surface
: the surface to duplicate.
§Return value
Returns a copy of the surface or NULL on failure; call SDL_GetError()
for
more information.
§Availability
This function is available since SDL 3.2.0.