summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2014-10-28 22:24:13 -0400
committerDavid Thompson <dthompson2@worcester.edu>2014-10-28 22:25:46 -0400
commit8ada9eac88d82a0034c56d3ea2281c4f5e5342aa (patch)
treeee532b91b3d2ed752d56eda504337a8cbaaa2c1b
parentcf061c18435ca545d75c1082f6e627afbfd36b77 (diff)
viewport: Define standard clear flags.
* sly/render/camera.scm (%standard-clear-flags): New variable.
-rw-r--r--sly/render/camera.scm6
1 files changed, 4 insertions, 2 deletions
diff --git a/sly/render/camera.scm b/sly/render/camera.scm
index 65e384c..5afb6f7 100644
--- a/sly/render/camera.scm
+++ b/sly/render/camera.scm
@@ -33,7 +33,7 @@
#:use-module (sly transform)
#:export (make-viewport viewport?
viewport-area viewport-clear-color viewport-clear-flags
- apply-viewport
+ %standard-clear-flags apply-viewport
make-camera camera?
camera-location camera-projection camera-viewport
orthographic-camera))
@@ -49,8 +49,10 @@
(clear-color viewport-clear-color)
(clear-flags viewport-clear-flags))
+(define %standard-clear-flags '(color-buffer depth-buffer))
+
(define* (make-viewport area #:optional #:key (clear-color black)
- (clear-flags '(color-buffer depth-buffer)))
+ (clear-flags %standard-clear-flags))
"Create a viewport that covers the rectangle AREA of the window.
Fill the viewport with CLEAR-COLOR when clearing the screen. Clear
the buffers denoted by the list of symbols in CLEAR-FLAGS. Possible