From bc66a865445ae18224564ae257a146dd7a529962 Mon Sep 17 00:00:00 2001 From: David Thompson Date: Tue, 3 Dec 2013 22:18:51 -0500 Subject: Open window when (2d window) is imported. * 2d/window.scm: Open window on import. --- 2d/window.scm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/2d/window.scm b/2d/window.scm index 241f71e..159a9a2 100644 --- a/2d/window.scm +++ b/2d/window.scm @@ -97,3 +97,10 @@ (lambda () (open-window window)) (lambda () body ...) (lambda () (close-window)))) + +;; Open a window immediately to create an OpenGL context. This allows +;; for textures to be loaded before the program explicitly sets the +;; window settings. +;; +;; TODO: Hide the window initially. This will require SDL 2.0. +(open-window (make-window #:title "")) -- cgit v1.2.3