diff options
-rw-r--r-- | guix.scm | 4 | ||||
-rw-r--r-- | starling/kernel.scm | 11 | ||||
-rw-r--r-- | starling/node-2d.scm | 4 |
3 files changed, 9 insertions, 10 deletions
@@ -126,7 +126,7 @@ SDL2 C shared library via the foreign function interface.") (license license:lgpl3+)))) (define chickadee - (let ((commit "b6b1699c1ff8661d49ff2b99256b59754bc7784a")) + (let ((commit "5d5d447356d7ec06e3d40ae690cb32c935704e58")) (package (name "chickadee") (version (string-append "0.5.0-1." (string-take commit 7))) @@ -137,7 +137,7 @@ SDL2 C shared library via the foreign function interface.") (commit commit))) (sha256 (base32 - "1qahisgpild9pb7ws0czngd8yscrj84lcszg646fgf96cia2s3fz")))) + "0gk58z5gnwi0ybdbj6rvmbyzm4bln7dljj0q9x7gpcz5j83nxcmf")))) (build-system gnu-build-system) (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0") diff --git a/starling/kernel.scm b/starling/kernel.scm index 3efd468..b973947 100644 --- a/starling/kernel.scm +++ b/starling/kernel.scm @@ -25,10 +25,9 @@ (define-module (starling kernel) #:use-module (chickadee audio) #:use-module (chickadee game-loop) - #:use-module (chickadee graphics) #:use-module (chickadee graphics color) + #:use-module (chickadee graphics engine) #:use-module (chickadee graphics font) - #:use-module (chickadee graphics gpu) #:use-module (chickadee graphics path) #:use-module (chickadee graphics viewport) #:use-module (chickadee math rect) @@ -300,7 +299,7 @@ (when developer-mode? (reload-modified-assets)) ;; Free any GPU resources that have been GC'd. - (gpu-reap!)) + (graphics-engine-reap!)) (define %clear-mask (logior (attrib-mask color-buffer) @@ -310,8 +309,8 @@ (define-method (render-tree (kernel <kernel>) alpha) (let ((start-time (elapsed-time))) - (with-viewport (default-viewport kernel) - (clear-screen) + (with-graphics-state! ((viewport (default-viewport kernel))) + (clear-viewport) (next-method)) (sdl2:swap-gl-window (window kernel)) ;; Compute FPS. @@ -364,7 +363,7 @@ (const #t) (lambda () (parameterize ((current-kernel kernel) - (current-gpu (make-gpu (gl-context kernel))) + (current-graphics-engine (make-graphics-engine (gl-context kernel))) (current-window (window kernel))) (activate kernel) (push-scene kernel (thunk)) diff --git a/starling/node-2d.scm b/starling/node-2d.scm index cdf8af1..d54edf9 100644 --- a/starling/node-2d.scm +++ b/starling/node-2d.scm @@ -26,8 +26,8 @@ #:use-module (chickadee math matrix) #:use-module (chickadee math rect) #:use-module (chickadee math vector) - #:use-module (chickadee graphics) #:use-module (chickadee graphics color) + #:use-module (chickadee graphics engine) #:use-module (chickadee graphics font) #:use-module (chickadee graphics framebuffer) #:use-module (chickadee graphics particles) @@ -169,7 +169,7 @@ (begin (when (target camera) (follow-target camera)) - (with-viewport (viewport camera) + (with-graphics-state ((viewport (viewport camera))) (with-projection (if (target camera) (view-matrix camera) (projection-matrix camera)) |