Function SDL_CreateSurface
pub unsafe extern "C" fn SDL_CreateSurface(
width: i32,
height: i32,
format: SDL_PixelFormat,
) -> *mut SDL_Surface
Available on crate feature
dep_sdl3
only.Expand description
Allocate a new surface with a specific pixel format.
The pixels of the new surface are initialized to zero.
§Parameters
width
: the width of the surface.height
: the height of the surface.format
: theSDL_PixelFormat
for the new surface’s pixel format.
§Return value
Returns the new SDL_Surface
structure that is created or NULL on failure;
call SDL_GetError()
for more information.
§Availability
This function is available since SDL 3.2.0.