fn handle_event(&mut self, event: glfw::WindowEvent) -> Result<()> {
        match event {
            glfw::WindowEvent::Key(
                glfw::Key::Escape,
                _,
                glfw::Action::Press,
                _,
            ) => {
                self.window_surface.window.set_should_close(true);
            }

            glfw::WindowEvent::Size(_, _) => {
                self.update_projection();
            }

            _ => {}
        }

        Ok(())
    }
/// Handle window events and update the application state as needed.
Handle window events and update the application state as needed.
Handle window events and update the application state as needed .
fn handle_event(&mut self, event: glfw::WindowEvent) -> Result<()> {
        match event {
            glfw::WindowEvent::Key(
                glfw::Key::Escape,
                _,
                glfw::Action::Press,
                _,
            ) => {
                self.window_surface.window.set_should_close(true);
            }
            glfw::WindowEvent::Size(_, _) => {
                self.update_projection();
            }
            _ => {}
        }
        Ok(())
    }
fn handle_event ( & mut self , event : glfw :: WindowEvent ) -> Result < ( ) > { match event { glfw :: WindowEvent :: Key ( glfw :: Key :: Escape , _ , glfw :: Action :: Press , _ , ) => { self . window_surface . window . set_should_close ( true ) ; } glfw :: WindowEvent :: Size ( _ , _ ) => { self . update_projection ( ) ; } _ => { } } Ok ( ( ) ) }
Handle window events and update the application state as needed.
Handle window events and update the application state as needed .
&mut self
event
glfw::WindowEvent