summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/skybox.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/chickadee/graphics/skybox.scm b/chickadee/graphics/skybox.scm
index d7fe5d7..093f629 100644
--- a/chickadee/graphics/skybox.scm
+++ b/chickadee/graphics/skybox.scm
@@ -36,6 +36,7 @@
skybox?
skybox-cube-map
skybox-mesh
+ default-skybox
draw-skybox))
(define-record-type <skybox>
@@ -87,6 +88,19 @@
#:attributes `((0 . ,positions)))))
(%make-skybox cube-map va)))
+;; A default, dark gray skybox.
+(define %default-skybox
+ (delay
+ (let ((face (list (u32vector #xff202020
+ #xff202020
+ #xff202020
+ #xff202020)
+ 2 2)))
+ (make-skybox (make-cube-map (make-list 6 face))))))
+
+(define (default-skybox)
+ (force %default-skybox))
+
(define %skybox-shader
(delay (load-shader (scope-datadir "shaders/skybox-vert.glsl")
(scope-datadir "shaders/skybox-frag.glsl"))))