Paste: new game loop
Author: | typemore |
Mode: | factor |
Date: | Thu, 19 Aug 2010 18:05:51 |
Plain Text |
: tick ( loop -- )
[
[ [ tick-delegate>> tick* ] with-benchmarking ]
[ [ draw-delegate>> draw* ] with-benchmarking ] bi
] keep record-benchmarking ;
: start-loop ( loop -- )
t >>running?
dup
[ '[ _ tick-iteration ] f ]
[ tick-interval-nanos>> nanoseconds ] bi <timer> >>tick-timer
tick-timer>> start-timer ;
Author: | typemore |
Mode: | factor |
Date: | Thu, 19 Aug 2010 18:11:09 |
Plain Text |
: tick ( loop -- )
[
[ [ tick-delegate>> tick* ] with-benchmarking ]
[ [ draw-delegate>> 0.0 swap draw* ] with-benchmarking ] bi
] keep record-benchmarking ;
New Annotation