SHARE
TWEET

Untitled

a guest Jan 25th, 2020 76 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   while let Some(e) = window.next() {
  2.     window.draw_2d(&e, |c, g, d| {
  3.  
  4.       fn drawFPS<G>(
  5.         &c: &Context,
  6.         glyphs: Glyphs,
  7.         &fps: &isize,
  8.         g: &mut Graphics<Texture>
  9.       ){
  10.         let transform = c.transform.trans(10.0, 100.0);
  11.         text::Text::new_color([0.0, 1.0, 0.0, 1.0], 32).draw(
  12.           format!("FPS {}", fps).as_str(),
  13.           &mut glyphs,
  14.           &c.draw_state,
  15.           transform,
  16.           g
  17.         ).unwrap();
  18.       }
  19.       let fps = counter.tick();
  20.     });
  21.   };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top