Re: [Plib-users] Multithreading in FG
Brought to you by:
sjbaker
From: steve <sjb...@ai...> - 2006-08-28 21:26:51
|
I havn't given much thought to threading alternate frames - the reason being that the increase in latency is not worth the savings in frame time. I design flight simulators for a living - and the fight to keep latency down is at least as important as the fight to keep frame rates up. Nothing in PLIB was ever designed for threading - so expect a LOT of things to break! Sadly, you are on your own on this one - this is not a path I'm interested in treading - it's a steep and twisty path and it's leading in the wrong direction. Good luck! Hemalatha Sharma wrote: > Hi, > We are using Flightgear version 0.9.4, in which we are trying to > implement multi-threading. In one thread, processing of next frame will > be done and in the other, rendering of the previous frame. Here, > fgMainLoop() is split into two threads, all the processing before > calling fgRenderFrame() in one thread, i.e. subsystem updates, > input/output updates, tile manager updates, etc., and fgRenderFrame() > in the other thread. > > Is this the correct method of splitting processing and rendering of > frame data? > > We are using the below to create a thread: > hThread[1] = > CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)fgRenderFrame1,NULL,0,&dwID[1]); > CloseHandle(hThread[1]); > > Using the above gives us stack dump error. > > Please give us a solution as to how to implement threading. > Eagerly waiting for your reply. |