Frame rate capped at 30fps?

Hey guys,

For some reason when I run my sdl/OpenGL app, occationally it gets
capped at 30fps. I’m running fraps and typically it reports a frame
rate between 1200-1800 fps, depending if part of the window is covered
by another app or not. However, very so often when I run it it appears
to be locked at exactly 30fps. I can unreliably reproduce this by
adding a breakpoint near the beginning of my code, after i’ve
initialized sdl but before I enter my main loop, but this might be
completely unrelated.

Any thoughts or ideas? The only thing that possibly comes to mind is
some crazy vsync issue or something. Any ideas would be appriciated.

-David Carrigg

What OS, video card and driver is this?

I saw something similar a few years ago, when using an ATI card under
X11/Linux. There was a bug in the driver that slowed rendering down
to N refresh periods per update when rendering into partially
occluded windows. Apparently, irregular regions were broken down into
rectangles and rendered one rectangle at a time, and the vsync point
was at the wrong level in that loop… However, that issue would go
away when disabling vsync.On Wednesday 24 June 2009, David Carrigg wrote:

Hey guys,

For some reason when I run my sdl/OpenGL app, occationally it gets
capped at 30fps. I’m running fraps and typically it reports a frame
rate between 1200-1800 fps, depending if part of the window is
covered by another app or not. However, very so often when I run it
it appears to be locked at exactly 30fps. I can unreliably reproduce
this by adding a breakpoint near the beginning of my code, after
i’ve initialized sdl but before I enter my main loop, but this might
be completely unrelated.

Any thoughts or ideas? The only thing that possibly comes to mind is
some crazy vsync issue or something. Any ideas would be appriciated.


//David Olofson - Programmer, Composer, Open Source Advocate

.------- http://olofson.net - Games, SDL examples -------.
| http://zeespace.net - 2.5D rendering engine |
| http://audiality.org - Music/audio engine |
| http://eel.olofson.net - Real time scripting |
’-- http://www.reologica.se - Rheology instrumentation --’