summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2021-09-23 07:17:26 -0400
committerDavid Thompson <dthompson2@worcester.edu>2021-09-23 07:17:26 -0400
commit0ccd85fe9a44bfb8920bfa0c9302d68b8675659d (patch)
tree421dcb245c8d4db34b57818bfffd1cf53ad71400
parent8ecc0f981f346fc8b2071636c4702ba8f4473f4d (diff)
graphics: depth: Add basic-depth-test variable.
-rw-r--r--chickadee/graphics/depth.scm3
-rw-r--r--chickadee/graphics/mesh.scm2
2 files changed, 4 insertions, 1 deletions
diff --git a/chickadee/graphics/depth.scm b/chickadee/graphics/depth.scm
index 8979997..7778cb2 100644
--- a/chickadee/graphics/depth.scm
+++ b/chickadee/graphics/depth.scm
@@ -27,6 +27,7 @@
depth-test-function
depth-test-near
depth-test-far
+ basic-depth-test
g:depth-test
current-depth-test))
@@ -41,6 +42,8 @@
(define* (make-depth-test #:key (write? #t) (function 'less-than) (near 0.0) (far 1.0))
(%make-depth-test write? function near far))
+(define basic-depth-test (make-depth-test))
+
(define (bind-depth-test depth-test)
(if depth-test
(let ((glfunc (match (depth-test-function depth-test)
diff --git a/chickadee/graphics/mesh.scm b/chickadee/graphics/mesh.scm
index 55e78a5..81a3a94 100644
--- a/chickadee/graphics/mesh.scm
+++ b/chickadee/graphics/mesh.scm
@@ -109,7 +109,7 @@
(blend-mode blend:replace)
(polygon-mode fill-polygon-mode)
(cull-face-mode back-cull-face-mode)
- (depth-test (make-depth-test))
+ (depth-test basic-depth-test)
(stencil-test default-stencil-test)
multisample?
(texture-0 null-texture)