diff options
author | David Thompson <dthompson2@worcester.edu> | 2016-01-12 08:33:35 -0500 |
---|---|---|
committer | David Thompson <dthompson2@worcester.edu> | 2016-01-12 08:38:51 -0500 |
commit | 4820142ac1741e9137a832cf20f2e17f6912b5c3 (patch) | |
tree | 3d07bdcb360f58fd8bdf2e74a486632798e2ef88 | |
parent | cb66f98d0feef93b93a7da273a56ef46de539e5f (diff) |
window: Configure various OpenGL parameters.
* sly/window.scm (init-window): Set OpenGL version to 3.2, explicitly
set double buffering and vsync, and configure depth buffer size.
-rw-r--r-- | sly/window.scm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sly/window.scm b/sly/window.scm index fb7c69b..739bb71 100644 --- a/sly/window.scm +++ b/sly/window.scm @@ -93,7 +93,12 @@ (define (init-window) (set! %sdl-window (sdl2:make-window #:opengl? #t #:show? #t)) - (set! %gl-context (sdl2:make-gl-context %sdl-window))) + (sdl2:set-gl-attribute! 'context-major-version 3) + (sdl2:set-gl-attribute! 'context-minor-version 2) + (sdl2:set-gl-attribute! 'double-buffer 1) + (sdl2:set-gl-attribute! 'depth-size 24) + (set! %gl-context (sdl2:make-gl-context %sdl-window)) + (sdl2:set-gl-swap-interval! 'vsync)) (define (open-window window) (let ((res (window-resolution window))) |