sdlCreateWindowAndRenderer function

int sdlCreateWindowAndRenderer(
  1. int width,
  2. int height,
  3. int windowFlags,
  4. Pointer<Pointer<SdlWindow>> window,
  5. Pointer<Pointer<SdlRenderer>> renderer,
)

Create a window and default renderer.

\param width the width of the window \param height the height of the window \param window_flags the flags used to create the window (see SDL_CreateWindow()) \param window a pointer filled with the window, or NULL on error \param renderer a pointer filled with the renderer, or NULL on error \returns 0 on success, or -1 on error; call SDL_GetError() for more information.

\since This function is available since SDL 2.0.0.

\sa SDL_CreateRenderer \sa SDL_CreateWindow

extern DECLSPEC int SDLCALL SDL_CreateWindowAndRenderer( int width, int height, Uint32 window_flags, SDL_Window **window, SDL_Renderer **renderer)

Implementation

int sdlCreateWindowAndRenderer(
    int width,
    int height,
    int windowFlags,
    Pointer<Pointer<SdlWindow>> window,
    Pointer<Pointer<SdlRenderer>> renderer) {
  final sdlCreateWindowAndRendererLookupFunction = libSdl2.lookupFunction<
          Int32 Function(
              Int32 width,
              Int32 height,
              Uint32 windowFlags,
              Pointer<Pointer<SdlWindow>> window,
              Pointer<Pointer<SdlRenderer>> renderer),
          int Function(
              int width,
              int height,
              int windowFlags,
              Pointer<Pointer<SdlWindow>> window,
              Pointer<Pointer<SdlRenderer>> renderer)>(
      'SDL_CreateWindowAndRenderer');
  return sdlCreateWindowAndRendererLookupFunction(
      width, height, windowFlags, window, renderer);
}