[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Weird OpenGL/GLU problem
On 11-Apr-2000 Mads Bondo Dydensborg wrote:
> It is calculated by calling gettimeofday, then rotate 4 degrees and
> refresh the display (90 times) then calling gettimeofday and say
> 90/(timediff). I believe it is correct. I can also tell a difference by
> timing with my stopwatch. And it is not the angle that gets skewed.
so the angle displays correctly? it doesn't slow down, just the FPS calculation?
Ok, when you calculate the time, you have 2 time structs, one sampled from the
beginning of your set of frames, and one sampled after. Are you resetting the
one from the beginning, or does it stay at the program start time through the
whole run? If you take one second to render a frame, then from the beginning to
the first set will be 90 seconds. If you don't reset, the second frame set will
claim it took 180 seconds, even though it took 90. The third will claim 270,
etc. That will result in a sharp drop in FPS at the beginning that levels out
and approaches 0.
>> it's probably just the program getting settled in... once it's up and
>> does it maintain the same framerate, or continue to drop?
> It continues to drop.
>> You might try running
>> a profiler on it, and possibly a memory debugger with a debug build of your
> I have tried using gprof, but the problem is that I cant get it to tell
> me, how the time varies. Only the total time spent in a function.
a short run will provide a set of times that should be close to the 'right'
runtime, while a long run will have more skew. Comparing the results of a long
and short run would hopefully point out any problems that match the description
> Mads Bondo Dydensborg. email@example.com
If you can't get it working, can you furnish the code? Being able to sit it on
my desktop and look at it and run it will let me make an accurate diagnosis
instead of blind speculation :) (and there are others here who are far beyond
my ability, so they might see an err in the code pretty obviously)
-Erik <firstname.lastname@example.org> [http://math.smsu.edu/~br0ke]
The opinions expressed by me are not necessarily opinions. In all
probability, they are random rambling, and to be ignored. Failure to ignore
may result in severe boredom or confusion. Shake well before opening. Keep
To unsubscribe, e-mail: email@example.com
For additional commands, e-mail: firstname.lastname@example.org