From 4820142ac1741e9137a832cf20f2e17f6912b5c3 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 12 Jan 2016 08:33:35 -0500 Subject: 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. --- sly/window.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sly/window.scm') 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))) -- cgit v1.2.3