diff options
-rw-r--r-- | chickadee.scm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/chickadee.scm b/chickadee.scm index f918330..fdf253e 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -21,6 +21,7 @@ #:use-module (sdl2 events) #:use-module (sdl2 input text) #:use-module (chickadee color) + #:use-module (chickadee math matrix) #:use-module (chickadee window) #:use-module (chickadee render) #:use-module (chickadee render gl) @@ -147,7 +148,9 @@ (with-window window (let ((update-interval (round (/ 1000 update-hz))) (default-viewport - (make-viewport 0 0 window-width window-height))) + (make-viewport 0 0 window-width window-height)) + (default-projection + (orthographic-projection 0 window-width window-height 0 0 1))) (call-with-prompt game-loop-prompt-tag (lambda () ;; Catch SIGINT and kill the loop. @@ -176,7 +179,8 @@ ;; Render a frame. (run-hook before-draw-hook) (with-viewport default-viewport - (run-hook draw-hook (/ lag update-interval))) + (with-projection default-projection + (run-hook draw-hook (/ lag update-interval)))) (swap-buffers window) (run-hook after-draw-hook) (loop current-time lag))))))) |