|
From: | Bo Lorentsen |
Subject: | Re: [glob2-devel] Threads ? |
Date: | Tue, 10 May 2005 17:21:30 +0200 |
User-agent: | Debian Thunderbird 1.0.2 (X11/20050331) |
Stephane Magnenat wrote:
Ahh, I didn't see that ... as I presumed it was not threaded due to the "clicking" noise :-) Maybe the sound buffer need to be larger and need to get filled up a little time before running empty (tress hold adjustment) ?So why not use threads for at least the GUI/sound system (keep these two synchronous) and the game loop, and then later maybe make a thread for networking too (that insert commands into the main engine). Also, the sound stream would get rid of this nagging "clicking" noise, because of the game loop.The sound, with SDL, is threaded. A function is called when the sound buffer has to be filled.
There is little sense at threading video as what is displayed is only computed by the core engine, so displaying twice the same frame is quite irrelevant.Hmm, maybe it would keep the model more clean, to do it this way, but You know the code better than I.
Perhaps we could implement a drop-frame feature, but as with GL the display takes only a very small amount of CPU, I don't thing that's critical for now.Some kind of invalidation calculation, so only needed gfx. gets updates, and user actions have its own thread (fast GUI update, no matter what is going on)
Just because all hardware gets faster, we don't need wasting power away on unneeded actions :-)
Well, feel free to add them when you feel it is necessary :-):-)
Thanks. /BL
[Prev in Thread] | Current Thread | [Next in Thread] |