pub fn flush_window(&mut self, window: &Window) -> Result<(), QuicksilverError> {
        self.projection = Transform::orthographic(Rectangle::new_sized(self.world_size));
        let viewport = self.calculate_viewport(window);
        let offset = viewport.top_left() * window.scale_factor();
        let size = viewport.size() * window.scale_factor();
        self.ctx.set_viewport(
            offset.x as u32,
            offset.y as u32,
            size.x as u32,
            size.y as u32,
        );
        golem::Surface::unbind(&self.ctx);
        self.flush_gpu()?;
        Ok(())
    }
/// Draw to the Window, without writing those changes to the screen
Draw to the Window, without writing those changes to the screen
Draw to the Window without writing those changes to the screen
pub fn flush_window(&mut self, window: &Window) -> Result<(), QuicksilverError> {
        self.projection = Transform::orthographic(Rectangle::new_sized(self.world_size));
        let viewport = self.calculate_viewport(window);
        let offset = viewport.top_left() * window.scale_factor();
        let size = viewport.size() * window.scale_factor();
        self.ctx.set_viewport(
            offset.x as u32,
            offset.y as u32,
            size.x as u32,
            size.y as u32,
        );
        golem::Surface::unbind(&self.ctx);
        self.flush_gpu()?;
        Ok(())
    }
pub fn flush_window ( & mut self , window : & Window ) -> Result < ( ) , QuicksilverError > { self . projection = Transform :: orthographic ( Rectangle :: new_sized ( self . world_size ) ) ; let viewport = self . calculate_viewport ( window ) ; let offset = viewport . top_left ( ) * window . scale_factor ( ) ; let size = viewport . size ( ) * window . scale_factor ( ) ; self . ctx . set_viewport ( offset . x as u32 , offset . y as u32 , size . x as u32 , size . y as u32 , ) ; golem :: Surface :: unbind ( & self . ctx ) ; self . flush_gpu ( ) ? ; Ok ( ( ) ) }
Draw to the Window, without writing those changes to the screen
Draw to the Window without writing those changes to the screen
&mut self
window
&Window
&mut self
window
&Window