SDL_CreateWindowAndRenderer - Man Page

Create a window and default renderer.

Synopsis

#include <SDL3/SDL_render.h>

bool SDL_CreateWindowAndRenderer(const char *title, int width, int height, SDL_WindowFlags window_flags, SDL_Window **window, SDL_Renderer **renderer);

Function Parameters

title

the title of the window, in UTF-8 encoding.

width

the width of the window.

height

the height of the window.

window_flags

the flags used to create the window (see SDL_CreateWindow()).

window

a pointer filled with the window, or NULL on error.

renderer

a pointer filled with the renderer, or NULL on error.

Return Value

for more information.

Thread Safety

This function should only be called on the main thread.

Availability

This function is available since SDL 3.2.0.

See Also

SDL_CreateRenderer(3), SDL_CreateWindow(3)

Referenced By

SDL_CreateWindow(3).

SDL 3.2.16 Simple Directmedia Layer SDL3 FUNCTIONS