summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2023-04-26 17:26:49 -0400
committerDavid Thompson <dthompson2@worcester.edu>2023-04-26 17:26:49 -0400
commitcb8778771ee3c543df7f33605fd2081c83cc4327 (patch)
tree158aa2c3e994294f02b16cc2d888f7481c4ea168
parent695fdd97906bb5a3695542037a516aa0f5d45d07 (diff)
graphics: skybox: Fix default skybox.
-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))