From 4682e17ac1246078d2169ccec01b163c59db8bcc Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Sun, 12 Jun 2022 15:15:53 +0300 Subject: [PATCH] gg: fix `v -d show_fps run examples/gg/stars.v` --- vlib/gg/gg.c.v | 3 +++ 1 file changed, 3 insertions(+) diff --git a/vlib/gg/gg.c.v b/vlib/gg/gg.c.v index f368061f68..0e8e36bd06 100644 --- a/vlib/gg/gg.c.v +++ b/vlib/gg/gg.c.v @@ -529,6 +529,9 @@ pub fn (ctx &Context) show_fps() { if !ctx.font_inited { return } + sgl.defaults() + sgl.matrix_mode_projection() + sgl.ortho(0.0, f32(sapp.width()), f32(sapp.height()), 0.0, -1.0, 1.0) frame_duration := sapp.frame_duration() fps_text := '${1 / frame_duration:2.0f}' ctx.set_cfg(ctx.fps.text_config)