(bind-func VBO
(lambda (buf:i32* buflen:i64 usage elements:i64 stride:i64)
(let ((vbo:VBO* (VBO:[VBO*,i32,i32,i64,i8*,i64,i64]* 0 GL_INT (* 4 buflen) (cast buf GLvoid*) elements stride)))
(glGenBuffers 1 (tref-ptr vbo 0))
(gl_print_error "Error creating VBO")
(glBindBuffer GL_ARRAY_BUFFER (id vbo))
(glBufferData GL_ARRAY_BUFFER (size vbo) (data vbo) usage)
(gl_print_error "Error setting VBO data")
(glBindBuffer GL_ARRAY_BUFFER 0)
;(printf "Created ") (print vbo) (printf "\n")
(zone_cleanup (glDeleteBuffers 1 (tref-ptr vbo 0))
(gl_print_error "Error deleting VBO"))
vbo)))