draw-world can't be called directly from a game loop; the ui update thread might switch GL contexts out from under us

db4
Joe Groff 2009-06-18 22:33:09 -05:00
parent 8cabad9011
commit cbe9bfffde
1 changed files with 2 additions and 2 deletions

View File

@ -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