;; make sure to call this from the scheduler!
(bind-func init_vg
(lambda (beat:float)
;; set THIS thread as opengl thread
;;(glfwMakeContextCurrent null)
;;(glfwMakeContextCurrent window)
(glfwSwapInterval 1)
(nvg_init)
(set! vg (nvg_create_context))
(set! pixel_ratio (glfw_get_pixel_ratio window))
(println "initialized vg")
void))