internal static IntPtr Instantiate(NativeWindow window) { window.nativePointer = SDLI.SDL_CreateWindow(window.title, window.Location.X, window.Location.Y, window.Size.Width, window.Size.Height, (SDL_WINDOW)window.Style); window.renderer = new Renderer(window.nativePointer, window.Size.Width, window.Size.Height); EventPump.Instance.RendererUpdate(window.renderer.Update); return(window.nativePointer); }
void ISDLNative.Start(EventPump eventPump) { if (SDLI.SDL_WasInit(sdlSystem) != sdlSystem) { // TODO: set error condition } eventPump.EventPumpStateChanged += EventPumpStateChanged; configure?.Invoke(); nativePointer = SDLI.SDL_CreateWindow(title, location.X, location.Y, size.Width, size.Height, (SDL_WINDOW)Style); renderer = new Renderer(nativePointer, size.Width, size.Height); eventPump.RendererUpdate(renderer.Update); isInitialized = true; initialized?.Invoke(isInitialized); }