glob2-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [glob2-devel] Threads ?


From: Nuage
Subject: Re: [glob2-devel] Threads ?
Date: Wed, 11 May 2005 00:19:03 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050429

Hello, thank you for your interrest.

>From a technical poit of view, we could still use sepatate threads and
display every frame exactly once. The idea would be to start the displaying
process just once the first computation step is finished, and to start the
next displaying and computation process step only once both are finished.
               __compute(1)__    __compute(2)__
__compute(0)__/              \__/              \__
              \__display(0)__/  \__display(1)__/  \__display(2)__/


But this would need some more architecture. More important, we would maybe
loose the greater feature: be able to use "valgrind" wouldn't we ? Anyone
exactly know, because we really need it!

Luc-Olivier

Bo Lorentsen wrote:
> Stephane Magnenat wrote:
> 
>>> 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.
>>  
>>
> 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) ?
> 
>> 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
> 
> 
> _______________________________________________
> glob2-devel mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/glob2-devel
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]