Allocate a new surface with a specific pixel format.
Defined in <SDL3/SDL_surface.h>
int width, int height, SDL_PixelFormat format); SDL_Surface * SDL_CreateSurface(
int | width | the width of the surface. |
int | height | the height of the surface. |
SDL_PixelFormat | format | the SDL_PixelFormat for the new surface's pixel format. |
(SDL_Surface *) Returns the new SDL_Surface structure that is created or NULL on failure; call SDL_GetError() for more information.
The pixels of the new surface are initialized to zero.
This function is available since SDL 3.1.3.