From 11406eb75164ea8da06128b6cdb777c2e610cf97 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Wed, 25 Jan 2017 22:09:26 -0500 Subject: Ensure that the viewport is cleared at the beginning of each frame. * chickadee.scm (run-game): Switch to the null viewport at the beginning of each frame to ensure other viewports are cleared. --- chickadee.scm | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'chickadee.scm') diff --git a/chickadee.scm b/chickadee.scm index 17cf33d..10136d9 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -179,6 +179,10 @@ (begin ;; Render a frame. (run-hook before-draw-hook) + ;; Switch to the null viewport to ensure that + ;; the default viewport will be re-applied and + ;; clear the screen. + (gpu-state-set! *viewport-state* null-viewport) (with-viewport default-viewport (with-projection default-projection (run-hook draw-hook (/ lag update-interval)))) -- cgit v1.2.3