SDL_CreateSurface3
Allocate a new surface with a specific pixel format.
Usage
#include "SDL3/SDL.h"
SDL_Surface * SDL_CreateSurface(int width, int height, SDL_PixelFormat format);
Header file
Defined in SDL3/SDL_surface.h
Overview
The pixels of the new surface are initialized to zero.
Function parameters
width
|
the width of the surface. |
|---|---|
height
|
the height of the surface. |
format
|
the |
Return value
( SDL_Surface
*) Returns the new SDL_Surface
structure that is created or NULL on failure; call
SDL_GetError () for more information.
Thread safety
It is safe to call this function from any thread.