Skip to main content

SDL_CreateWindowAndRenderer

Function SDL_CreateWindowAndRenderer 

Source
pub unsafe extern "C" fn SDL_CreateWindowAndRenderer(
    title: *const c_char,
    width: c_int,
    height: c_int,
    window_flags: SDL_WindowFlags,
    window: *mut *mut SDL_Window,
    renderer: *mut *mut SDL_Renderer,
) -> bool
Expand description

Create a window and default renderer.

Parameter: title the title of the window, in UTF-8 encoding. Parameter: width the width of the window. Parameter: height the height of the window. Parameter: window_flags the flags used to create the window (see SDL_CreateWindow()). Parameter: window a pointer filled with the window, or NULL on error. Parameter: renderer a pointer filled with the renderer, or NULL on error. 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.

Available Since: This function is available since SDL 3.2.0.

See Also: SDL_CreateRenderer See Also: SDL_CreateWindow