summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/mesh.scm6
-rw-r--r--chickadee/graphics/model.scm3
2 files changed, 4 insertions, 5 deletions
diff --git a/chickadee/graphics/mesh.scm b/chickadee/graphics/mesh.scm
index 14cd82a..55e78a5 100644
--- a/chickadee/graphics/mesh.scm
+++ b/chickadee/graphics/mesh.scm
@@ -132,9 +132,7 @@
(g:multisample? (material-multisample? material))
(g:polygon-mode (material-polygon-mode material))
(g:stencil-test (material-stencil-test material))
- (g:texture-0 (if skybox
- (skybox-cube-map skybox)
- null-texture))
+ (g:texture-0 (skybox-cube-map skybox))
(g:texture-1 (material-texture-0 material))
(g:texture-2 (material-texture-1 material))
(g:texture-3 (material-texture-2 material))
@@ -194,7 +192,7 @@
(define* (draw-mesh mesh #:key (model-matrix %identity-matrix)
(view-matrix %identity-matrix)
(camera-position %origin)
- skybox
+ (skybox (default-skybox))
(lights '()))
;; Populate light vector to pass on to shader.
(let ((light-vector (mesh-light-vector mesh)))
diff --git a/chickadee/graphics/model.scm b/chickadee/graphics/model.scm
index 5e0857e..11e90d5 100644
--- a/chickadee/graphics/model.scm
+++ b/chickadee/graphics/model.scm
@@ -40,6 +40,7 @@
#:use-module (chickadee graphics phong)
#:use-module (chickadee graphics polygon)
#:use-module (chickadee graphics shader)
+ #:use-module (chickadee graphics skybox)
#:use-module (chickadee graphics texture)
#:use-module (chickadee utils)
#:use-module (ice-9 format)
@@ -151,7 +152,7 @@
(define %depth-test (make-depth-test))
(define* (draw-model model model-matrix view-matrix camera-position #:key
- skybox
+ (skybox (default-skybox))
(lights '()))
(with-graphics-state ((g:depth-test %depth-test)
(g:multisample? #t))