diff options
author | David Thompson <dthompson2@worcester.edu> | 2017-01-18 18:52:26 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2017-01-18 18:52:26 -0500 |
commit | 7adf3c594013fa67c1749c9655c1f4bea6b7ea5c (patch) | |
tree | 967082ecc46436bc87a31bdac7b404656c9b3143 | |
parent | ee2cc0b45f5dc8682f5e54cc36c165e1c6ad9f9b (diff) |
Run GPU finalizers in game loop.
-rw-r--r-- | chickadee.scm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/chickadee.scm b/chickadee.scm index e3d128a..b9996e1 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -22,6 +22,7 @@ #:use-module (sdl2 input text) #:use-module (chickadee window) #:use-module (chickadee render gl) + #:use-module (chickadee render gpu) #:export (load-hook update-hook before-draw-hook @@ -163,7 +164,9 @@ (loop (poll-event)))) ;; Advance the simulation. (run-hook update-hook update-interval) - (update-loop (- lag update-interval))) + (update-loop (- lag update-interval)) + ;; Free any GPU resources that have been GC'd. + (gpu-reap!)) (begin ;; Render a frame. (run-hook before-draw-hook) |