(bind-func move_particles
"move the particles_verts according to their velocities"
(lambda (np:i64 step:float)
(let ((p:float* null))
(doloop (i np)
(set! p (pref-ptr particles_verts (* i 4)))
;; update x pos
(pset! p 0 (% (+ (pref p 0)
(* (pref p 2) step))
1.0))
;; update y pos
(pset! p 1 (% (+ (pref p 1)
(* (pref p 3) step))
1.0))))))