fn update(&mut self, ctx: ContextView<'_>) {
        // self.event_loop.run_return(|wev, _, control_flow| {
        //     {
        //         // Event may be processed by InputHandler.
        //         let mut input_handler = ctx.input_handler().write();
        //         input_handler.on_before_update();
        //         input_handler.on_event(&wev);
        //     }

        //     match wev {
        //         WinitEvent::WindowEvent { ref event, .. } => {
        //             match *event {
        //                 WinitWindowEvent::Resized { .. } => {
        //                     // Emit a resize event to core renderer.
        //                     ctx.emit_event(RenderEvent::WindowResized).unwrap();
        //                 }
        //                 #[cfg(target_os = "ios")]
        //                 WindowEvent::Destroyed => {
        //                     ctx.request_close();
        //                 }
        //                 WinitWindowEvent::CloseRequested => {
        //                     ctx.request_close();
        //                 }
        //                 _ => {}
        //             }
        //         }
        //         _ => {}
        //     }

            // println!("{:?}", wev);

            // *control_flow = ControlFlow::Exit
        // });
    }
// The window update logic. It is completely safe to mutate anything in [Context] because
// window system is the first system to be run in each loop and there is no other system
// running in parallel.
The window update logic. It is completely safe to mutate anything in [Context] because
window system is the first system to be run in each loop and there is no other system
running in parallel.
The window update logic . It is completely safe to mutate anything in [ Context ] because window system is the first system to be run in each loop and there is no other system running in parallel .
fn update(&mut self, ctx: ContextView<'_>) {
        // self.event_loop.run_return(|wev, _, control_flow| {
        //     {
        //         // Event may be processed by InputHandler.
        //         let mut input_handler = ctx.input_handler().write();
        //         input_handler.on_before_update();
        //         input_handler.on_event(&wev);
        //     }
        //     match wev {
        //         WinitEvent::WindowEvent { ref event, .. } => {
        //             match *event {
        //                 WinitWindowEvent::Resized { .. } => {
        //                     // Emit a resize event to core renderer.
        //                     ctx.emit_event(RenderEvent::WindowResized).unwrap();
        //                 }
        //                 #[cfg(target_os = "ios")]
        //                 WindowEvent::Destroyed => {
        //                     ctx.request_close();
        //                 }
        //                 WinitWindowEvent::CloseRequested => {
        //                     ctx.request_close();
        //                 }
        //                 _ => {}
        //             }
        //         }
        //         _ => {}
        //     }
            // println!("{:?}", wev);
            // *control_flow = ControlFlow::Exit
        // });
    }
fn update ( & mut self , ctx : ContextView < ' _ > ) { // self.event_loop.run_return(|wev, _, control_flow| { //     { //         // Event may be processed by InputHandler. //         let mut input_handler = ctx.input_handler().write(); //         input_handler.on_before_update(); //         input_handler.on_event(&wev); //     } //     match wev { //         WinitEvent::WindowEvent { ref event, .. } => { //             match *event { //                 WinitWindowEvent::Resized { .. } => { //                     // Emit a resize event to core renderer. //                     ctx.emit_event(RenderEvent::WindowResized).unwrap(); //                 } //                 #[cfg(target_os = "ios")] //                 WindowEvent::Destroyed => { //                     ctx.request_close(); //                 } //                 WinitWindowEvent::CloseRequested => { //                     ctx.request_close(); //                 } //                 _ => {} //             } //         } //         _ => {} //     } // println!("{:?}", wev); // *control_flow = ControlFlow::Exit // }); }
The window update logic.
The window update logic .
&mut self
ctx
ContextView<'_>
&mut self
ctx
ContextView<'_>