From 658ffcfb09ff5b958010a43fefc2452f29d56efa Mon Sep 17 00:00:00 2001 From: Joe Groff Date: Thu, 18 Jun 2009 22:33:09 -0500 Subject: [PATCH] draw-world can't be called directly from a game loop; the ui update thread might switch GL contexts out from under us --- extra/game-worlds/game-worlds.factor | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extra/game-worlds/game-worlds.factor b/extra/game-worlds/game-worlds.factor index 2fb115b5d0..542c48fbae 100644 --- a/extra/game-worlds/game-worlds.factor +++ b/extra/game-worlds/game-worlds.factor @@ -1,5 +1,5 @@ USING: accessors game-input game-loop kernel math ui.gadgets -ui.gadgets.worlds ui.gestures ; +ui.gadgets.worlds ui.gestures threads ; IN: game-worlds TUPLE: game-world < world @@ -9,7 +9,7 @@ TUPLE: game-world < world GENERIC: tick-length ( world -- millis ) M: game-world draw* - swap >>tick-slice draw-world ; + swap >>tick-slice relayout-1 yield ; M: game-world begin-world open-game-input