[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(Resolved) RE: Weird OpenGL/GLU problem
On Wed, 12 Apr 2000, Erik wrote:
> > Oh, hit c to try the framerate out (IIRC) - otherwise it is in keyboard.c
> >
>
> it is 'c' according to keyboard.c but it doesn't seem to do anything for me :/
It should have. Damn, it must be buggy like ..
> I compiled and ran your program, and was unable to find a visual error... it
> rendered each frame in about the same time (extremely slowly on my crappy
> hardware). The only fluctuation in speed was due to the scene complexity, which
> is expected. My setup is a cyrix 120mhz, 4m voodooG, X3.3.6 (debian 2.3),
> Mesa3.1 (with debian), and running in a window (it probably would have been
> fast fullscreen).
It should render faster fullscreen, although the use of textures is
probably so braindead that it can't render fast on any but the best
hardware. I would be curious to as what you get with
MESA_GLX_FX=f ./3dse
> What I'm thinking now is there may be a flaw in your driver
> or configuration or something? *shrug* I was unable to reproduce it :)
Due to your advice I found out what the problem is, and it is rather
embarrasing. I will descripe what went wrong, and why I should wear a
brown paperbag today.
Basically I was not rendering the same scene. Each time I did a
"refreshrate", I would write the final result into a string that I would
render at the top of the screen, using a function from GLU. For the next
refreshrate, this string would be rendered for each frame, and _that
alone_ was enough to bring my refreshrate down from approx. 50 to 45. For
the next refreshrate, there would be 2 strings at the top of the screen,
which would result in a rate of 39. For the next refreshrate, 3, etc. The
program begins to drop the oldest strings when more then 4 are rendered,
and this would mean that the framerate would settle at around 34.
The reason I should wear a brown paperbag is that I really thought I
rendered the same stuff. But I did not, since I rendered a raising number
of lines. By clearing all the lines before doing the refresh, the
performance is now as steady as expected.
What surprises me is that the glut function to render a series of letters
would be such a performance hitter. I will have to investigate how other
games writes strings to an opengl context. The way I am doing it is
clearly not good enough.
I did identify this problem by profiling a number of test runs, with
an increasing number of refreshes. Thanks for that advice.
Man, do I feel dumb.
Mads
--
Mads Bondo Dydensborg. madsdyd@challenge.dk
Games like Tribe, Unreal, Quake, even The Legend of Zelda, and yes, Doom,
can be astoundingly creative, challenging and imaginative. They are often
demanding, played in communal and interactive ways. Some people may be
uncomfortable with some of their imagery.
- Jon Katz, Slashdot, on youth culture
---------------------------------------------------------------------
To unsubscribe, e-mail: linuxgames-unsubscribe@sunsite.auc.dk
For additional commands, e-mail: linuxgames-help@sunsite.auc.dk