DOKK / manpages / debian 13 / libsdl3-doc / SDL_CreateWindowAndRenderer.3.en
SDL_CreateWindowAndRenderer(3) SDL3 FUNCTIONS SDL_CreateWindowAndRenderer(3)

SDL_CreateWindowAndRenderer - Create a window and default renderer.

Defined in SDL3/SDL_render.h

#include "SDL3/SDL.h"
bool SDL_CreateWindowAndRenderer(const char *title, int width, int height, SDL_WindowFlags window_flags, SDL_Window **window, SDL_Renderer **renderer);

the title of the window, in UTF-8 encoding.
the width of the window.
the height of the window.
the flags used to create the window (see SDL_CreateWindow ()).
a pointer filled with the window, or NULL on error.
a pointer filled with the renderer, or NULL on error.

Returns true on success or false on failure; call

SDL_GetError () for more information.

This function should only be called on the main thread.

This function is available since SDL 3.2.0.

(3), SDL_CreateRenderer(3), (3), SDL_CreateWindow(3)

SDL 3.2.10 Simple Directmedia Layer