(bind-func nvg_draw_loop
(let ((bar_rect (Rect 0. 0. (* 0.5 (convert width)) (convert height)))
(scatter_rect (Rect (* 0.5 (convert width)) 0. (* 0.5 (convert width)) (convert height))))
(lambda (time:i64 delta_t:double)
(nvg_clear)
(nvgBeginFrame vg width height pixel_ratio)
(nvgResetTransform vg)
(draw_barplot bar_rect)
(draw_scatterplot scatter_rect)
(nvgEndFrame vg)
(glfwPollEvents)
(glfwSwapBuffers window)
(let ((next_time (+ time (convert (* 44100. delta_t)))))
(callback next_time nvg_draw_loop next_time delta_t)))))