diff options
author | David Thompson <dthompson2@worcester.edu> | 2019-11-06 08:25:09 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2019-11-06 08:25:09 -0500 |
commit | 74961faeba18772cd02c8d8f6bac3afda890020c (patch) | |
tree | 9b2abf3a6c64384ba19a9d950dff75d0dcd27963 /chickadee.scm | |
parent | 624ac6f520aac872630e2e5b300bdd53ef201d86 (diff) |
render: Collect all managed GPU state into a single record type.
Diffstat (limited to 'chickadee.scm')
-rw-r--r-- | chickadee.scm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chickadee.scm b/chickadee.scm index 3066f26..58513d4 100644 --- a/chickadee.scm +++ b/chickadee.scm @@ -144,6 +144,7 @@ not being pushed at all." #:size (list window-width window-height) #:fullscreen? window-fullscreen?)) (gl-context (make-gl-context window)) + (gpu (make-gpu gl-context)) (default-viewport (make-viewport 0 0 window-width window-height)) (default-projection (orthographic-projection 0 window-width window-height 0 @@ -221,7 +222,7 @@ not being pushed at all." ;; Switch to the null viewport to ensure that ;; the default viewport will be re-applied and ;; clear the screen. - (gpu-state-set! *viewport-state* null-viewport) + (set-gpu-viewport! gpu null-viewport) (with-viewport default-viewport (with-projection default-projection (draw alpha))) @@ -229,7 +230,8 @@ not being pushed at all." (dynamic-wind (const #t) (lambda () - (parameterize ((current-window window)) + (parameterize ((current-window window) + (current-gpu gpu)) ;; Attempt to activate vsync, if possible. Some systems do ;; not support setting the OpenGL swap interval. (catch #t |