[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Weird OpenGL/GLU problem
On 10-Apr-2000 Mads Bondo Dydensborg wrote:
> Hey there.
> I have written a small game and is expericing some pretty weird behaviour.
> I use the glutKeyboard... function call to adjust my viewpoint of my
> world, then glutPostRedisplay to redisplay. Works fine framerate is
> acceptable (well, frame render time). I have a function to rotate 360
> degrees in 4 degrees steps, and measure time. (Using gettimeofday :-).
> 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.
> Now, this is a demo game, and there are no memory allocations. I check
> glGetError several times, no errors are returned. The problem occurs with
> and without textures, and with and with using lists.
> Obviously I am doing something wrong, but I can't figure out what. (And I
> assume you can neither from this very short description, and no source).
> What I am looking for is someone that may be able to regoniece (spelling
> is hard) my symptoms and direct me in the rigth direction. What kind of
> misuse of the OpenGL system could cause this kind of framerate reduction
> between different speedmeasurements? No changes to the datastructures take
> place AFAIK.
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? You might try running
a profiler on it, and possibly a memory debugger with a debug build of your ogl
library? If you're calculating the average framerate from the beginning, then
you probably have an off-by-one error in there. I'd personally convert it to
calculate the framerate on small samples...
> Any hints or guesses would be appriciated.
> P.S. I realise that this may not be strictly linux related. I hope it is
it's game related and it's on a linux platform, right? so it sounds all good to
me *shrug* I don't think anyone else will have a problem :)
> Mads Bondo Dydensborg. firstname.lastname@example.org
> Estimates of online gamers in the United States alone run as high as 15 to
> 20 million people.
> - Jon Katz, Slashdot, on youth culture.
-Erik <email@example.com> [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: firstname.lastname@example.org
For additional commands, e-mail: email@example.com