summaryrefslogtreecommitdiff
path: root/starling/kernel.scm
diff options
context:
space:
mode:
Diffstat (limited to 'starling/kernel.scm')
-rw-r--r--starling/kernel.scm11
1 files changed, 5 insertions, 6 deletions
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))