anchor.diff:  
   
   ;;;
  -;;; timing functions
  +;;; Timing functions
   ;;;
   
   (let (start-event stop-event)
  
positive.code:         (start-timer)
          ;; start glut main loop
          (glut:display-window window))))))
  
negative.code:           (create-timer-events)
            ,@body)
       (destroy-timer-events)))
  
  
  ;;;
  ;;; NBodyDemo
  ;;;
  
  (defun nbody-demo-update-simulation (new-pos old-pos vel delta-time damping num-bodies p)
    (integrate-nbody-system new-pos old-pos vel delta-time damping num-bodies p))
  
  (defun nbody-demo-display (pos num-bodies)
    ; (particle-renderer-set-spirte-size ...)
    (particle-renderer-set-positions pos num-bodies)
    (particle-renderer-display))
  
  
  ;;;
  ;;; Particle Renderer
  ;;;
  
  (let ((m-pos           nil)
        (m-num-particles 0  )
        (m-point-size    1.0)
        ;(m-sprite-size   2.0)
        ;(m-vertex-shader nil)
        ;(m-pixel-shader  nil)
        ;(m-program       nil)
        ;(m-texture       nil)
        ;(m-pbo           nil)
        ;(m-vbo-color     nil)
        ;(m-base-color    nil))
        )
    (defun particle-renderer-set-positions (pos num-particles)
      (setf m-pos pos)
      (setf m-num-particles num-particles))
    
    (defun particle-renderer-set-base-color (color)
      (declare (ignore color))
      (not-implemented))
    
    (defun particle-renderer-set-colors (color num-particles)
      (declare (ignore color num-particles))
      (not-implemented))
    
    (defun particle-renderer-set-pbo (pbo num-particles)
      (declare (ignore pbo num-particles))
      (not-implemented))
    
    (defun particle-renderer-display ()
      ; mode = PARTICLE_POINTS
      (gl:color 1.0 1.0 1.0)
      (gl:point-size m-point-size)
      (draw-points))
    
    (defun particle-renderer-set-point-size (size)
      (declare (ignore size))
      (not-implemented))
    
    (defun particle-renderer-set-sprite-size (size)
      (declare (ignore size))
      (not-implemented))
    
    (defun particle-renderer-reset-pbo ()
      (not-implemented))
    
    (defun init-gl ()
      (not-implemented))
    
    (defun create-texture (resolution)
      (declare (ignore resolution))
      (not-implemented))
    
    (defun draw-points ()
      (memcpy-device-to-host m-pos)
      (gl:begin :points)
      (dotimes (i m-num-particles)
        (let ((p (mem-aref m-pos i)))
          (gl:vertex (float4-x p) (float4-y p) (float4-z p))))
      (gl:end)))
  
  
  ;;;
  