summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sly/window.scm7
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)))