Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Minor
  • Loading branch information
Shinmera committed Mar 6, 2020
1 parent 074fbe0 commit 5de3041
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions renderable.lisp
Expand Up @@ -33,16 +33,16 @@
(let ((fc 0)) (let ((fc 0))
(declare (type fixnum fc)) (declare (type fixnum fc))
(with-simple-restart (exit-render-loop "Exit the render loop entirely.") (with-simple-restart (exit-render-loop "Exit the render loop entirely.")
(with-retry-restart (reset-render-loop "Reset the render loop timing, not catching up with lost frames.") (unwind-protect
(let ((tt 0.0d0) (with-retry-restart (reset-render-loop "Reset the render loop timing, not catching up with lost frames.")
(dt (coerce (delta-time renderable) 'double-float)) (let ((tt 0.0d0)
(current-time (current-time)) (dt (coerce (delta-time renderable) 'double-float))
(accumulator 0.0d0) (current-time (current-time))
(new-time 0.0d0) (accumulator 0.0d0)
(frame-time 0.0d0)) (new-time 0.0d0)
(declare (type double-float tt dt current-time (frame-time 0.0d0))
accumulator new-time frame-time)) (declare (type double-float tt dt current-time
(unwind-protect accumulator new-time frame-time))
(with-error-logging (:trial.renderable "Error in render thread") (with-error-logging (:trial.renderable "Error in render thread")
(loop while (thread renderable) (loop while (thread renderable)
do (setf new-time (current-time)) do (setf new-time (current-time))
Expand All @@ -58,5 +58,5 @@
(setf (frame-time renderable) frame-time) (setf (frame-time renderable) frame-time)
(with-simple-restart (abort "Abort the update and retry.") (with-simple-restart (abort "Abort the update and retry.")
(render renderable renderable) (render renderable renderable)
(incf fc)))) (incf fc))))))
(v:info :trial.renderable "Exiting render-loop for ~a." renderable))))))) (v:info :trial.renderable "Exiting render-loop for ~a." renderable)))))

0 comments on commit 5de3041

Please sign in to comment.