Am Freitag, 23. Februar 2007 schrieb Per Inge Mathisen: > On 2/23/07, Kamaze <[EMAIL PROTECTED]> wrote: > > Like i said, i got the best average FPS/CPU usage ratio > > with one SDL_Delay(1) call each 5 frames. > > On your computer, that is. The obvious problem with hard-coding > something like this is that it will very likely not be the best on > other people's computers. If someone's computer is struggling to keep > up a minimum of frames to play the game, then adding delay calls every > 5th frame will hurt. > > Besides, calling SDL_Delay(1) is the same as calling the OS > scheduler's yield command. You tell the OS scheduler that now other > processes can run, even if they could have waited. There is no way to > know how long the OS scheduler will take to get back to your process. > If there is a low-priority IO-bound process in the background, giving > it lots of time slices can kill your framerate completely. So you will > want to measure the results like SDL_framerateDelay tries and offset > problems like that. > > > If we/you want to use SDL_Framerate() as something like V-Sync, then it > > may be better to use the > > http://www.opengl.org/registry/specs/EXT/wgl_swap_control.txt extension. I don't know if anyone noticed that... It reads WGL_swap_control. So this is a WGL and no GL extension. And WGL is afaik the short for WindowsGL. So this is not generic. We'd have to look into GLX on Linux and on whatever else on MacOS and BSD.
Anyway, was just a sidenote. Don't want to interupt the discussion. --Dennis
pgp6zsXuRgwNF.pgp
Description: PGP signature
_______________________________________________ Warzone-dev mailing list [email protected] https://mail.gna.org/listinfo/warzone-dev
