(bind-func init_vao
(lambda ()
(let ((num (* CUBE_W CUBE_H))
(verts:float* (alloc (* 4 num)))
(colours:float* (alloc (* 4 num)))
(vbo_verts (VBO verts (* 4 num)))
(vbo_colours (VBO colours (* 4 num)))
(i 0) (j 0) (k 0))
;; set all to centre
(dotimes (i (* 4 num)) (pset! verts i 0.0))
;; white colour
(dotimes (i (* 4 num)) (pset! colours i 1.0))
;; setup vao
(set_attribute DataVAO vbo_verts 0 4)
(set_attribute DataVAO vbo_colours 3 4)
(update vbo_verts)
(update vbo_colours)
void)))