1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

gg: fix v -d show_fps run examples/gg/stars.v

This commit is contained in:
Delyan Angelov 2022-06-12 15:15:53 +03:00
parent 7e06203da8
commit 4682e17ac1
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -529,6 +529,9 @@ pub fn (ctx &Context) show_fps() {
if !ctx.font_inited { if !ctx.font_inited {
return 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() frame_duration := sapp.frame_duration()
fps_text := '${1 / frame_duration:2.0f}' fps_text := '${1 / frame_duration:2.0f}'
ctx.set_cfg(ctx.fps.text_config) ctx.set_cfg(ctx.fps.text_config)