summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Thompson <dthompson2@worcester.edu>2013-12-03 22:18:51 -0500
committerDavid Thompson <dthompson2@worcester.edu>2013-12-03 22:18:51 -0500
commitbc66a865445ae18224564ae257a146dd7a529962 (patch)
treeeaa170c93fcd7bda1791b0b134d0dd2615883be2
parent34da564b38bb41a80bf5aa465a17e2d8daac2405 (diff)
Open window when (2d window) is imported.
* 2d/window.scm: Open window on import.
-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 ""))