Mercurial > projects > mde
comparison mde/mde.d @ 85:56c0ddd90193
Intermediate commit (not stable). Changes to init system.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Thu, 11 Sep 2008 11:33:51 +0100 |
parents | e0f1ec7fe73a |
children | 79d816b3e2d2 |
comparison
equal
deleted
inserted
replaced
84:e0f1ec7fe73a | 85:56c0ddd90193 |
---|---|
23 import mde.imde; // this module's interface for external modules | 23 import mde.imde; // this module's interface for external modules |
24 import mde.events; // pollEvents() // NOTE: Must be imported before Init, otherwise fonts don't display properly (why??) | 24 import mde.events; // pollEvents() // NOTE: Must be imported before Init, otherwise fonts don't display properly (why??) |
25 import mde.setup.Init; // initialization | 25 import mde.setup.Init; // initialization |
26 import mde.lookup.Options; // pollInterval option | 26 import mde.lookup.Options; // pollInterval option |
27 import mde.scheduler.Scheduler; // mainSchedule | 27 import mde.scheduler.Scheduler; // mainSchedule |
28 import gl = mde.gl.draw; // gl.draw() | 28 import mde.setup.Screen; // Screen.draw() |
29 | 29 |
30 import tango.core.Thread : Thread; // Thread.sleep() | 30 import tango.core.Thread : Thread; // Thread.sleep() |
31 import tango.time.Clock; // Clock.now() | 31 import tango.time.Clock; // Clock.now() |
32 import tango.util.log.Log : Log, Logger; | 32 import tango.util.log.Log : Log, Logger; |
33 debug (mdeUnitTest) { | 33 debug (mdeUnitTest) { |
54 /* Note: the main loop is currently controlled by the scheduler. This is not really ideal, | 54 /* Note: the main loop is currently controlled by the scheduler. This is not really ideal, |
55 * since it provides no direct control of the order in which components are executed and does | 55 * since it provides no direct control of the order in which components are executed and does |
56 * not allow running components simultaeneously with threads. | 56 * not allow running components simultaeneously with threads. |
57 * Note: probably drawing should start at the beginning of the loop and glFlush()/swapBuffers | 57 * Note: probably drawing should start at the beginning of the loop and glFlush()/swapBuffers |
58 * be called at the end to optimise. */ | 58 * be called at the end to optimise. */ |
59 mainSchedule.add (SCHEDULE.DRAW, &gl.draw); // Draw, per event only. | 59 mainSchedule.add (SCHEDULE.DRAW, &Screen.draw); // Draw, per event only. |
60 mainSchedule.add (mainSchedule.getNewID, &mde.events.pollEvents).frame = true; | 60 mainSchedule.add (mainSchedule.getNewID, &mde.events.pollEvents).frame = true; |
61 //END Main loop setup | 61 //END Main loop setup |
62 | 62 |
63 while (run) { | 63 while (run) { |
64 mainSchedule.execute (Clock.now()); | 64 mainSchedule.execute (Clock.now()); |