(bind-func gl_draw_loop
(lambda (time:i64 delta_t:double)
(gl_render peppino scene dome pyramid)
;; swap buffers
(glfwPollEvents)
(glfwSwapBuffers window)
;; set next frame callback
(let ((next_time (+ time (convert (* 44100. delta_t)))))
(callback next_time gl_draw_loop next_time delta_t))))