summaryrefslogtreecommitdiff
path: root/sly/render
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2015-03-11 22:16:55 -0400
committerDavid Thompson <dthompson2@worcester.edu>2015-03-11 22:27:25 -0400
commit99b05d3e2c27b575157f00450143cdff965c5369 (patch)
tree87461a3a79654114996924cf5ead54e30bbb9a68 /sly/render
parent68fc1480bfcd38747e1cf27943e6dbd3e63e37b9 (diff)
render: utils: Add apply-depth-test.
* sly/render/utils (apply-depth-test): New procedure.
Diffstat (limited to 'sly/render')
-rw-r--r--sly/render/utils.scm8
1 files changed, 7 insertions, 1 deletions
diff --git a/sly/render/utils.scm b/sly/render/utils.scm
index 802eca7..56a8b63 100644
--- a/sly/render/utils.scm
+++ b/sly/render/utils.scm
@@ -30,7 +30,8 @@
#:export (make-blend-mode blend-mode?
blend-mode-source blend-mode-destination
default-blend-mode
- apply-blend-mode))
+ apply-blend-mode
+ apply-depth-test))
;;;
;;; Blending
@@ -85,3 +86,8 @@
(destination-blend-function
(blend-mode-destination blend-mode))))
(gl-disable (enable-cap blend))))
+
+(define (apply-depth-test depth-test?)
+ (if depth-test?
+ (gl-enable (enable-cap depth-test))
+ (gl-disable (enable-cap depth-test))))