summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-04-28 07:38:03 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-04-28 07:38:38 -0400
commitaa13e87d5040e025caff278237a8fee3de4aa2ef (patch)
treea6be73dc061c9b1f2a2596c394c75677e4ce7ed0
parent8edba4d957f49d816ea9e773c69d4a6ece7f07d1 (diff)
graphics: framebuffer: Clear viewport in with-framebuffer form.
-rw-r--r--chickadee/graphics/framebuffer.scm5
1 files changed, 3 insertions, 2 deletions
diff --git a/chickadee/graphics/framebuffer.scm b/chickadee/graphics/framebuffer.scm
index b0cb9fc..9c4b99b 100644
--- a/chickadee/graphics/framebuffer.scm
+++ b/chickadee/graphics/framebuffer.scm
@@ -153,7 +153,8 @@ dimensions WIDTH x HEIGHT."
;; as well so that the user doesn't have to explicitly make a
;; viewport and/or projection matrix unless they actually want to do
;; fancy viewport manipulations.
- (with-graphics-state ((g:framebuffer framebuffer)
- (g:viewport (framebuffer-viewport framebuffer)))
+ (with-graphics-state! ((g:framebuffer framebuffer)
+ (g:viewport (framebuffer-viewport framebuffer)))
+ (clear-viewport)
(with-projection (framebuffer-projection framebuffer)
body ...)))