(bind-func VAO
(lambda ()
(let ((vao:VAO* (alloc))
(as (attribs vao))
(bs (buffers vao))
(id:GLuint* (salloc))
(i 0))
(glGenVertexArrays 1 id) ;;(tref-ptr vao 0))
(tset! vao 0 (pref id 0))
(gl_print_error "Error creating VAO")
(dotimes (i 16)
(aset! as i #f)
(aset! bs i null))
;(printf "Created ") (print vao) (printf "\n")
(zone_cleanup (glDeleteVertexArrays 1 (tref-ptr vao 0))
(gl_print_error "Error deleting VAO"))
vao)))