[SDL] OpenGL speed, Linux vs W2000

Dave Slutzkin daveslutzkin at fastmail.fm
Wed Jan 22 15:55:01 PST 2003

On Thu, 23 Jan 2003 12:19:03 +1300, "Gib Bogle" <bogle at ihug.co.nz> said:
> The SDL test program testgl.c gives quite different execution speeds on
> Linux and W2000 on my system (P4, GF4 Ti).  Running flat out in
> 1024x768 fullscreen, bpp=24, Linux gives 620 fps, while W2000 gives
> 1550 fps.  It seems that the difference is in SDL_GL_SwapBuffers().
> Commenting that out pushes the Linux version up to 1650 fps.  (I think
> W2000 gives something similar, but the program doesn't like to run with
> buffer swap suppressed.  When run from a Command Prompt window it
> returns quickly to the command prompt but the process continues to
> execute.  This odd behaviour might be of interest to someone.)
> I realize that 620 vs 1550 fps is actually rather academic, since it
> represents only an extra 0.1 ms per frame, but nonetheless I'm curious
> to know why swapping buffers with W2000 is faster than with Linux,
> since I think this is happening on the video card.

I've seen this sort of symptom on machines with different video cards and
drivers, but with the same OS.  I think it occurs because one of the
machines (the 2000 machine, in your case), is not waiting for the vsync
on a SwapBuffers call - as you say, when it is commented out on the other
machine, you get about the same frame rate (disregarding small OS
specific performance differences).

I'm not certain exactly why this is - I think there's an option on the
driver of many cards in Windows to turn off or on synchronization with
the vertical retrace.  Some drivers may not even support vsync waiting.
Does that sound about right?

  David Slutzkin, BCS (Hons)
  Melbourne, Australia
  daveslutzkin at fastmail.fm

http://fastmail.fm - The way an email service should be

More information about the SDL mailing list