Creates a new surface identical to the existing surface.
Defined in <SDL3/SDL_surface.h>
surface | the surface to duplicate. |
Returns a copy of the surface, or NULL on failure; call SDL_GetError() for more information.
The returned surface should be freed with SDL_DestroySurface().
This function is available since SDL 3.0.0.