SDL_CreateWindowAndRenderer - Create a window and default renderer.
Contents
Availability
This function is available since SDL 3.2.0.
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.
Header File
Defined in SDL3/SDL_render.h
Name
SDL_CreateWindowAndRenderer - Create a window and default renderer.
Return Value
Returns true on success or false on failure; call
SDL_GetError () for more information.
See Also
•(3), SDL_CreateRenderer(3), •(3), SDL_CreateWindow(3) Simple Directmedia Layer SDL 3.2.10 SDL_CreateWindowAndRenderer(3)
Synopsis
#include"SDL3/SDL.h"boolSDL_CreateWindowAndRenderer(constchar*title,intwidth,intheight,SDL_WindowFlagswindow_flags,SDL_Window**window,SDL_Renderer**renderer);
Thread Safety
This function should only be called on the main thread.
