summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chickadee/graphics/skybox.scm17
1 files changed, 11 insertions, 6 deletions
diff --git a/chickadee/graphics/skybox.scm b/chickadee/graphics/skybox.scm
index 6de8a58..57e2f81 100644
--- a/chickadee/graphics/skybox.scm
+++ b/chickadee/graphics/skybox.scm
@@ -29,6 +29,7 @@
#:use-module (chickadee graphics polygon)
#:use-module (chickadee graphics shader)
#:use-module (chickadee graphics texture)
+ #:use-module (chickadee pixbuf)
#:use-module (srfi srfi-9)
#:export (make-skybox
skybox?
@@ -86,15 +87,19 @@
#:attributes `((0 . ,positions)))))
(%make-skybox cube-map va)))
+(define %default-skybox-face
+ (bytevector->pixbuf (u32vector #xff202020 #xff202020 #xff202020 #xff202020)
+ 2 2))
+
;; 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))))))
+ (make-skybox (make-cube-map #:right %default-skybox-face
+ #:left %default-skybox-face
+ #:top %default-skybox-face
+ #:bottom %default-skybox-face
+ #:front %default-skybox-face
+ #:back %default-skybox-face))))
(define (default-skybox)
(force %default-skybox))