[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Weird OpenGL/GLU problem



On Mon, 10 Apr 2000, Erik wrote:

> > Works perfect the first time, I get 50 fps. The second time I get 44, the
> > third 40 and it settles at 38. (This is the weird behavoiur).
> > 
> 
> is this over the first 3 frames? there's usually a bit of jump in framerates
> while everything gets loaded up and settled in... at least in my experiance
> Those numbers look special to me, like the framerate is being calculated too
> often. You might want to calculate the framerate every 20 or so frames to get a
> more accurate number, as well as having the onscreen display a little more
> readable. Q3 and UT don't update their frame display every frame because it
> looks pretty lame :) That tutorial I have shows how to do that, but it uses the
> clock() method... I need to fix it.
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.

> 
> it's probably just the program getting settled in... once it's up and running,
> 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 ogl
> library? 

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.

Mads

-- 
Mads Bondo Dydensborg.                               madsdyd@challenge.dk
NT is a closed box of point tools linked by an untouchable matrix of
invisible semaphores. These bonds are surrounded by a blizzard of
mystifying, contradictory, and forever-changing OS documentation. 
Under an NT regime, almost all Unix users will lose the ability to 
exert low-level control over data and applications.


---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk