From b461585f7f3d76526156389e42d960f3e2942b92 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 16 Jun 2013 14:53:09 -0400 Subject: Add close-window procedure. --- 2d/window.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/2d/window.scm b/2d/window.scm index 02c75c9..5231efc 100644 --- a/2d/window.scm +++ b/2d/window.scm @@ -24,7 +24,8 @@ (define-module (2d window) #:use-module (figl gl) #:use-module ((sdl sdl) #:prefix SDL:) - #:export (open-window)) + #:export (open-window + close-window)) (define* (open-window width height #:optional (depth 24)) "Creates the game window with the specified dimensions and @@ -44,3 +45,8 @@ initializes OpenGL state." (gl-enable (enable-cap blend)) (set-gl-blend-function (blending-factor-src src-alpha) (blending-factor-dest one-minus-src-alpha))) + +(define (close-window) + "Closes the game window and cleans up. This procedure is typically +called just before calling (quit)." + (SDL:quit)) -- cgit v1.2.3