Linux, glXSwapBuffers, and VSYNC

Hi,

I was wondering how I can be sure that glXSwapBuffers(), swaps the buffers during VBLANK time under Linux.

I know about the GLX_SGI_video_sync extension, but this extension doesn’t exist in the NVIDIA openGL drivers. Also, when I switch to MESA drivers (which support this extension), glXWaitVideoSyncSGI() doesn’t wait at all and glXGetVideoSyncSGI() always returns 0 and sets the count out-parameter to 0.

Can anyone help me out?

Thanks,

John.

Forget about GLX_SGI_video_sync. This extension is not very common, and quite inconvenient.

You have to use GLX_SGI_swap_control .

Thanks for your reply.

I can’t seem to find GLX_SGI_swap_control in any of my OpenGL header files.

I’m running XFree86 4.0 under linux which comes with Mesa (an open-source OpenGL).

Again, my question is, “How can I ensure that glXSwapBuffers() actually swaps the buffers during VBLANK time?”

And, as a secondary issue, “Assuming that glXSwapBuffers() swaps during VBLANK, what does it do while its waiting for the next VBLANK signal? Burn CPU time? Suspend the process? If it suspends, then how can I be sure that the scheduler will resume my process before the end of VBLANK time?”

Thanks,

John.