On Mon, 28 Aug 2006, 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?

Hi,

Without having looked into the actual structure of this parts of FlightGear at all, my opinion is that your approach is not the most desirable one. If I were to introduce multithreading in this part of FlightGear I would try do completely separating the rendering task from the simulation task and only let them interact through state variables in shared memory. In that way one could run the simulation task and input processing at a high and stable rate, while the frame rate produced by the renderer could be allowed to vary considerably with the complexity of the scene.

A temporary dramatic drop in (graphical) fps would be much easier to cope with if the control inputs where still sampled at the normal rate.

Btw. I think the flightgear-devel list would be a better forum for your question.

Cheers,

Anders
--
"In a world without fences, who needs gates?"
---------------------------------------------------------------------
Anders Gidenstam
WWW: http://www.gidenstam.org/FlightGear/
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/flightgear-users

Reply via email to