summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <davet@gnu.org>2015-06-06 14:46:30 -0400
committerDavid Thompson <davet@gnu.org>2015-06-06 14:46:30 -0400
commitfc6b4fb4ba04ed93acc545a52505f26dfc9198e8 (patch)
treec0a662a8063be6d01e88206453a330bde4b88b86
parentdd50a8667c4359e532902844be276c239b87df74 (diff)
render: camera: Add null-viewport.
* sly/render/camera.scm (null-viewport): New variable.
-rw-r--r--sly/render/camera.scm3
1 files changed, 3 insertions, 0 deletions
diff --git a/sly/render/camera.scm b/sly/render/camera.scm
index a9b8e41..48a66b2 100644
--- a/sly/render/camera.scm
+++ b/sly/render/camera.scm
@@ -35,6 +35,7 @@
#:export (make-viewport viewport?
viewport-area viewport-clear-color viewport-clear-flags
%standard-clear-flags apply-viewport
+ null-viewport
make-camera camera?
camera-location camera-projection camera-viewport
orthographic-camera))
@@ -61,6 +62,8 @@ values for CLEAR-FLAGS are 'color-buffer', 'depth-buffer',
'accum-buffer', and 'stencil-buffer'."
(%make-viewport area clear-color clear-flags))
+(define null-viewport (make-viewport (make-rect 0 0 0 0)))
+
(define clear-buffer-mask
(memoize
(lambda (flags)