Skip to content
Permalink
Browse files

Explicitly release the context on render loop exit.

  • Loading branch information...
Shinmera committed Jul 1, 2019
1 parent a8ff3ea commit 6adf05900dffd15537cfd0c91545b30dcea1bf32
Showing with 6 additions and 1 deletion.
  1. +5 −0 display.lisp
  2. +1 −1 renderable.lisp
@@ -64,6 +64,11 @@
(call-next-method)
(swap-buffers context))))

(defmethod render-loop :around ((display display))
(unwind-protect
(call-next-method)
(release-context (context display))))

(defmethod width ((display display))
(width (context display)))

@@ -30,7 +30,7 @@
(defmethod render (thing (renderable renderable)))
(defmethod update ((renderable renderable) tt dt))

(defun render-loop (renderable)
(defmethod render-loop ((renderable renderable))
(with-retry-restart (reset-render-loop "Reset the render loop timing, not catching up with lost frames.")
(let ((tt 0.0d0)
(dt (coerce (delta-time renderable) 'double-float))

0 comments on commit 6adf059

Please sign in to comment.
You can’t perform that action at this time.