PDA

View Full Version : Long swap times, frames getting dropped rendering to a QGLWidget



MattPhillips
6th April 2010, 03:53
Hello,

I'm rendering relatively quite simple
graphics into a QGLWidget--40 or so gluDisks about 75 pixels wide--and on some runs of
the program, I'm losing up to 25% of the frames. I call the system
clock immediately before and immediately after the swapBuffer() command,
as in


t1 = GetSystemTime();
swapBuffer();
t2 = GetSystemTime();

When frames are dropped, the swap time (t2- t1) is frequently around 25ms (on a 60Hz monitor).
This varies somewhat from run to run, but within a run it can be quite
consistent, e.g. 25500 microseconds +/-100us for each dropped frame.
(Though typically other swap times, e.g. 30ms, will be interspersed.)
Anyway, the result is graphics so choppy as to be unusable. Like I said
on some runs of the program it's worse than others, but I have no idea
why--everything else on the system is the same. I went to the OpenGL boards with this and they thought it was probably a Qt-specific issue.

Does anybody know
what's up, and how I can eliminate this? Thanks!

Matt