diff options
author | David Thompson <dthompson2@worcester.edu> | 2014-01-26 16:21:48 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2014-01-26 16:21:48 -0500 |
commit | c9c97dd8bcb0b6365b7180d5e5c946eb179c057e (patch) | |
tree | 2ea441e74e7615bf5314c010f9a3e5f5e5303ecc /2d/window.scm | |
parent | 446750df6a786a8fcce7309e2f9b145e53e24e4f (diff) |
Move OpenGL viewport settings to game module.
* 2d/window.scm (open-window): Remove viewport config.
* 2d/game.scm (draw): Add viewport config.
Diffstat (limited to '2d/window.scm')
-rw-r--r-- | 2d/window.scm | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/2d/window.scm b/2d/window.scm index 416a8cf..7697e07 100644 --- a/2d/window.scm +++ b/2d/window.scm @@ -75,19 +75,14 @@ (let ((flags (if (window-fullscreen? window) '(opengl fullscreen) 'opengl)) (width (vx (window-resolution window))) (height (vy (window-resolution window)))) + (signal-set! window-width width) + (signal-set! window-height height) ;; Initialize everything (SDL:enable-unicode #t) (SDL:init 'everything) ;; Open SDL window in OpenGL mode. (SDL:set-video-mode width height 24 flags) (SDL:set-caption (window-title window)) - ;; Initialize OpenGL orthographic view - (gl-viewport 0 0 width height) - (set-gl-matrix-mode (matrix-mode projection)) - (gl-load-identity) - (gl-ortho 0 width height 0 -1 1) - (set-gl-matrix-mode (matrix-mode modelview)) - (gl-load-identity) ;; Enable texturing and alpha blending (gl-enable (enable-cap texture-2d)) (gl-enable (enable-cap blend)) |