Jean Daigle (jaydee++at++thor.ats.qc.ca)
Thu, 16 Feb 1995 23:20:52 -0500
On Feb 16, 5:39pm, "Beaver, Jim" wrote:
}... The problem is this: using a pfPhase of FLOAT
} or LOCK, the application runs at the frame rate specified by pfFrameRate just
} fine until, say, it has to draw a lot of terrain, for example, such that it
} can't get done in the specified time frame. When this happens, instead of the
} frame rate slowing down to whatever it takes to complete the drawing, the frame
} rate gets cut to half its specified rate. For example, in my application I
} specify a frame rate of 12 HZ and if I get to a point that everything can't get
} drawn that fast, the frame rate gets cut to 6 Hz. This is only a problem with
} PFPHASE_FLOAT and PFPHASE_LOCK. When I tried running with PFPHASE_FREE_RUN, the
} same application drawing the same terrain runs at from 10Hz to 14Hz, varying as
} different objects come into or go out of view. ...
...
}-- End of excerpt from "Beaver, Jim"
What you are observing is in accordance with the pfPhase() man page:
Depending on the phase as is discussed below, pfSync synchronizes the
application process with the frame rate specified by pfFrameRate (when
phase is PFPHASE_LOCK or PFPHASE_FLOAT), or to the system rendering rate
(when phase is PFPHASE_FREE_RUN or PFPHASE_LIMIT). In the first case,
pfSync sleeps until the next frame boundary, then awakens and returns
control to the application. In the second case, pfSync sleeps until the
draw process begins rendering a new frame or returns immediately if in
single-process operation. ...
For _LOCK and _FLOAT phases, frame extension is very costly -- you lose
an entire frame period.
Our experience with the _LIMIT phase has been encouraging -- frame
extension is then by increments of field times (the distinction between
frame and field times was elucidated in another response to your post).
At a 72Hz refresh rate (13.9ms field times), you should expect the
frame rate to slip from 14.4Hz (5 field times) to 12Hz (6 field times)
during conditions of increasing scene load.
I'm not sure how much _LIMIT phase will buy you on a uniprocessor
machine, but it's worth a try.
Regards,
Jean Daigle.
-----------------------------------------------------------------
| Jean Daigle ATS Aerospace Inc. |
| Software Designer 1250 Boul Marie-Victorin |
| St. Bruno, QC J3V 6B8 |
| jaydee++at++ats.qc.ca Tel: (514) 441-9000 Fax: (514) 441-6789 |
-----------------------------------------------------------------
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:58 PDT