(bind-func set_instance_matrices
(lambda (model:XTMModel* vbo:VBO*)
(let ((i 0)
(num_children (tref model 3))
(children (tref model 4))
(num_meshes (tref model 5))
(meshes (tref model 6))
(mesh:XTMMesh* null)
(vao:VAO* null))
(dotimes (i num_children)
(set_instance_matrices (pref-ptr children i) vbo))
(dotimes (i num_meshes)
(set! mesh (pref-ptr meshes i))
(set! vao (tref mesh 10))
(set_attribute vao vbo 4 16 #t))
void))) ;; true for instance attrib