pub fn render(&mut self, window_surface: &dyn WindowSurface) -> Result<()> {
        if let Ok(mut frame) = self.frame_context.acquire_frame() {
            self.draw_to_frame(&mut frame)?;
            self.frame_context.return_frame(frame)?
        } else {
            self.rebuild_swapchain(window_surface)?;
        }
        Ok(())
    }
/// Render a single frame to the screen.
Render a single frame to the screen.
Render a single frame to the screen .
pub fn render(&mut self, window_surface: &dyn WindowSurface) -> Result<()> {
        if let Ok(mut frame) = self.frame_context.acquire_frame() {
            self.draw_to_frame(&mut frame)?;
            self.frame_context.return_frame(frame)?
        } else {
            self.rebuild_swapchain(window_surface)?;
        }
        Ok(())
    }
pub fn render ( & mut self , window_surface : & dyn WindowSurface ) -> Result < ( ) > { if let Ok ( mut frame ) = self . frame_context . acquire_frame ( ) { self . draw_to_frame ( & mut frame ) ? ; self . frame_context . return_frame ( frame ) ? } else { self . rebuild_swapchain ( window_surface ) ? ; } Ok ( ( ) ) }
Render a single frame to the screen.
Render a single frame to the screen .
&mut self
window_surface
&dyn WindowSurface