table of contents
other versions
- testing 3.2.10+ds-1
- unstable 3.2.10+ds-1
- experimental 3.3~git20250806+ds-1
SDL_CreateWindowAndRenderer(3) | SDL3 FUNCTIONS | SDL_CreateWindowAndRenderer(3) |
NAME¶
SDL_CreateWindowAndRenderer - 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¶
Returns true on success or false on failure; call SDL_GetError() 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 3.3.0 | Simple Directmedia Layer |