summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm13
1 files changed, 8 insertions, 5 deletions
diff --git a/chickadee.scm b/chickadee.scm
index 8343a6b..289bc4d 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -313,7 +313,10 @@ border is disabled, otherwise it is enabled.")
(orthographic-projection 0 window-width
window-height 0
0 1)))
- (gpu (make-gpu (unwrap-window window) (window-gl-context window))))
+ (adapter (make-gpu-adapter))
+ (device (gpu-adapter-request-device adapter
+ (unwrap-window window)
+ (window-gl-context window))))
(define (invert-y y)
;; SDL's origin is the top-left, but our origin is the bottom
;; left so we need to invert Y coordinates that SDL gives us.
@@ -421,7 +424,7 @@ border is disabled, otherwise it is enabled.")
;; This is where all user code is executed.
(define (game-loop)
(parameterize ((current-window window)
- (current-gpu gpu))
+ (current-gpu-device device))
(run-game* #:init load
#:update update
#:render draw
@@ -442,10 +445,10 @@ border is disabled, otherwise it is enabled.")
;; (clear-viewport)
;; (with-graphics-state ((projection (vector-ref default-projection 0)))
;; (draw alpha)))
- (gpu-tick gpu)
- (gpu-swap gpu)
+ (gpu-device-tick device)
+ (gpu-device-swap device)
;; Free any GPU resources that have been GC'd.
- (gpu-gc gpu)
+ (gpu-device-gc device)
(usleep 1) ; don't use 100% of the cpu pls
(main-loop))
;; Attempt to activate vsync, if possible. Some systems do