gl-loop   xtlang


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/examples/contrib/kinect_fire.xtm

Implementation

;; a trivial opengl draw loop
;; need to call glfwSwapBuffers to flush
(bind-func gl-loop
  (let (;(degree 0.0)
  (i 0)
  (point_data1:float* (halloc 10000000))
  (color_data1:float* (halloc 10000000))
  (point_data2:float* (halloc 10000000))
  (color_data2:float* (halloc 10000000)))
    (lambda ()
      ;; _skeletons-alive_ and _skeletons_ from kinect.xtm
      (dotimes (i 6)
  (if (pref _skeletons-alive_ i)
      (begin (pset! _skeletons-alive_ i 0)
       (draw-skeleton (aref-ptr _skeletons_ i)))))
      ;(update-fluid-sym-state)


Back to Index

Similar Entries