my-gl-loop   xtlang


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

Implementation

;; a trivial opengl draw loop
;; need to call glfwSwapBuffers to flush
(bind-func my-gl-loop
  (let ((degree 0.0))
    (lambda ()
      ;; (glClearColor 1.0 0.5 0.0 1.0)
      (glClearColor 0.0 0.0 0.0 1.0)
      (glClear (+ GL_COLOR_BUFFER_BIT GL_DEPTH_BUFFER_BIT))


Back to Index