summaryrefslogtreecommitdiff
path: root/chickadee.scm
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2020-07-12 08:19:45 -0400
committerDavid Thompson <dthompson2@worcester.edu>2020-08-24 15:04:51 -0400
commit1967f72de20cc0c176375b4a1b704b322ef7dcd1 (patch)
tree52ce29506beca39970b0d576c32e1a2c6d208981 /chickadee.scm
parent89563f5a727386da2175394813ee09601e7220e8 (diff)
render: gpu: Query GL context for GL and GLSL versions.
Diffstat (limited to 'chickadee.scm')
-rw-r--r--chickadee.scm6
1 files changed, 6 insertions, 0 deletions
diff --git a/chickadee.scm b/chickadee.scm
index defa0a0..7b43888 100644
--- a/chickadee.scm
+++ b/chickadee.scm
@@ -235,6 +235,12 @@ border is disabled, otherwise it is enabled.")
(sdl-init)
(start-text-input)
(init-audio)
+ ;; Hint that we want OpenGL 3.2 Core profile. Doesn't mean we'll
+ ;; get it, though!
+ (sdl2:set-gl-attribute! 'context-major-version 3)
+ (sdl2:set-gl-attribute! 'context-major-version 2)
+ (sdl2:set-gl-attribute! 'context-profile-mask 1) ; core profile
+ (sdl2:set-gl-attribute! 'stencil-size 8) ; 8-bit stencil buffer
(let* ((window (sdl2:make-window #:opengl? #t
#:title window-title
#:size (list window-width window-height)