From: Stephen J B. <sj...@ht...> - 2000-05-15 15:16:18
|
On Mon, 15 May 2000, Arnfried Griesert wrote: > Hi, > > I've written a simple routine to get the frame rate of the monitor. The > program is very simple, it uses a loop for calculating the time of 100 > glXSwapBuffers(). On my SGI with OpenGL it works fine, but with MesaGL > it failed, because the swapping of the two buffers is not syncronized > with the vertical monitor sync. > > My question is if anyone knows why glXSwapBuffers() doesn't wait for a > vertical sync or if this behavior is correct. It depends on what 3D hardware you have. 3Dfx cards have environment variables to select between wait-for-vsync or not. Some cards don't do this at all - or at least don't advertise the fact. Even with hardware that lock the swap to a vertical retrace, they may return from the glXSwapBuffers call immediately and only block your program's execution when you next do an OpenGL call that can affect the frame buffer. (I thought that SGI's machines did this) Some PC hardware can do triple buffering and allow an entire frame of rendering to occour whilst you are waiting for the buffer to swap on the previous frame's rendering. The deal seems to be that there is certainly no portable way to do this - and possibly no way to do it at all on some machines. Steve Baker (817)619-2657 (Vox/Vox-Mail) L3Com/Link Simulation & Training (817)619-2466 (Fax) Work: sj...@ht... http://www.hti.com Home: sjb...@ai... http://web2.airmail.net/sjbaker1 |