When I turn my program in fullscreen (640x480, 800x600 etc) the refresh rate is about 50Hz ~ 60Hz but my monitor supports 100Hz in 800x600.
What I can do?
<- Chameleon ->
http://tassadar.physics.auth.gr/~chameleon/
cham_gss at hotmail.NOSPAM.com
When I turn my program in fullscreen (640x480, 800x600 etc) the refresh rate is about 50Hz ~ 60Hz but my monitor supports 100Hz in 800x600.
What I can do?
<- Chameleon ->
http://tassadar.physics.auth.gr/~chameleon/
cham_gss at hotmail.NOSPAM.com
When I turn my program in fullscreen (640x480, 800x600 etc) the refresh rate is about 50Hz ~ 60Hz but my monitor supports 100Hz in 800x600.
What I can do?
What platform and video drivers are you using?
See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment
When I turn my program in fullscreen (640x480, 800x600 etc) the
refresh rate is about 50Hz ~ 60Hz but my monitor supports 100Hz in
800x600.What I can do?
What platform and video drivers are you using?
While we’re on the subject, I don’t think there’s an SDL function for
returning the framerate, but it would be a great addition. It would be
particularly useful for programs that swap buffers at the vertical
blanking interval. I know it can be computed or queried in a
platform-dependent way, but if we could query SDL for it, that would be
great. What problems would arise with adding such a function?
Cheers!
Andrew
While we’re on the subject, I don’t think there’s an SDL function for
returning the framerate, but it would be a great addition. It would be
particularly useful for programs that swap buffers at the vertical
blanking interval. I know it can be computed or queried in a
platform-dependent way,
SDL’s way of providing the information you need to compute it is not
platform-dependent.
but if we could query SDL for it, that would be
great. What problems would arise with adding such a function?
It isn’t SDL’s job to do that calculation, SDL’s job is to provide you with
the basic platform-independent operations that can’t be expressed in terms of
other operations. It’s easy for you to calculate the framerate using
SDL_GetTicks():
new_ticks = SDL_GetTicks();
frames_per_second = 1000. / max(new_ticks - old_ticks, 1);
old_ticks = new_ticks;
Anyway, you’ll find that milliseconds_per_frame tends to be a more useful
number than frames_per_second, and it’s even easier to calculate. In either
case, you probably want to filter the number, e.g., by averaging it over
several frames.
Regards,
DanielOn Sunday 09 February 2003 04:22, Andrew Straw wrote: