Re: pfSync() and faster dynamics

New Message Reply Date view Thread view Subject view Author view

John Rohlf (jrohlf++at++tubes)
Thu, 28 Oct 93 09:23:21 -0700


>I want to run my vehicle dynamics loop at an integral multiple
>of the cull/draw calls. That is, if the frame rate is 30 Hz, I'd
>like to cruise through my dynamics simulation at 60 or 120 Hz.
>The reason for this is to provide faster feedback to other
>systems, including a motion platform and cockpit displays (not
>the monitors).
>
>What would be the best way to do this? I am fairly sure that the
>model is simple enough to allow such a high rate.

Probably the best method is to fork a processs which runs the
dynamics simulation and communicates the results to Performer's APP
process through shared memory. Remember that this dynamics process
should not modify any Performer data structures. You can
use the video clock through pfVClockSync to synchronize this process.

pfVClockSync() uses the video retrace clock for synchronization
so it won't work for rates > the video rate which is usually 60Hz.
Therefore, running at 120Hz is problematic and requires a different
synchronization mechanism. You could spin on pfGetTime() if you had
a CPU to burn.


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:04 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.