Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- while let Some(e) = window.next() {
- window.draw_2d(&e, |c, g, d| {
- fn drawFPS<G>(
- &c: &Context,
- glyphs: Glyphs,
- &fps: &isize,
- g: &mut Graphics<Texture>
- ){
- let transform = c.transform.trans(10.0, 100.0);
- text::Text::new_color([0.0, 1.0, 0.0, 1.0], 32).draw(
- format!("FPS {}", fps).as_str(),
- &mut glyphs,
- &c.draw_state,
- transform,
- g
- ).unwrap();
- }
- let fps = counter.tick();
- });
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement