summaryrefslogtreecommitdiff
path: root/2d/window.scm
diff options
context:
space:
mode:
Diffstat (limited to '2d/window.scm')
-rw-r--r--2d/window.scm7
1 files changed, 7 insertions, 0 deletions
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 ""))