diff options
author | David Thompson <dthompson2@worcester.edu> | 2017-01-19 11:13:31 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2017-01-19 11:13:31 -0500 |
commit | a57fbeb9ca813a4aace2a9e538bd84db9aa4a804 (patch) | |
tree | ca6d79b1b698d69e28c2fccc4299c386867b2681 | |
parent | 7015cd493c5546b186ca419738ed7718d8e3a5ee (diff) |
render: viewport: Use a non-black default clear color.
-rw-r--r-- | chickadee.scm | 6 | ||||
-rw-r--r-- | chickadee/render/viewport.scm | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/chickadee.scm b/chickadee.scm index 41a3d90..f918330 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -147,11 +147,7 @@ (with-window window (let ((update-interval (round (/ 1000 update-hz))) (default-viewport - (make-viewport 0 0 window-width window-height - ;; Just a fun color from the Dawnbringer - ;; 32-color palette instead of boring old - ;; black. - #:clear-color (rgb #x45283c)))) + (make-viewport 0 0 window-width window-height))) (call-with-prompt game-loop-prompt-tag (lambda () ;; Catch SIGINT and kill the loop. diff --git a/chickadee/render/viewport.scm b/chickadee/render/viewport.scm index 5768406..b4a4ce3 100644 --- a/chickadee/render/viewport.scm +++ b/chickadee/render/viewport.scm @@ -39,6 +39,7 @@ viewport-clear-flags null-viewport %standard-clear-flags + %default-clear-color apply-viewport *viewport-state*)) @@ -53,14 +54,17 @@ (clear-flags viewport-clear-flags)) (define %standard-clear-flags '(color-buffer depth-buffer)) +;; Just a fun color from the Dawnbringer 32-color palette instead of +;; boring old black. +(define %default-clear-color (rgb #x45283c)) (define (assert-non-negative-integer n) (if (and (integer? n) (>= n 0)) n (error "expecting non-negative integer:" n))) -(define* (make-viewport x y width height #:key (clear-color black) - (clear-flags %standard-clear-flags)) +(define* (make-viewport x y width height #:key + (clear-color %default-clear-color) "Create a viewport that covers an area of the window starting from coordinates (X, Y) and spanning WIDTH x HEIGHT pixels. Fill the viewport with CLEAR-COLOR when clearing the screen. Clear the buffers |