About VSync

Hi everybody,

I’m currently working on vertical synchronization. The question is simple : On windows I’ve found a method (wglGetSwapIntervalEXT() in WGL_EXT_swap_control) to know if VSync is activated.

My problem is, I cannot find the method for linux support. I have already checked SGI and ARB even if I don’t know so much about extensions.

Thanks
Benjamin

[QUOTE=Benjamin3D;1242418]I’m currently working on vertical synchronization. The question is simple : On windows I’ve found a method (wglGetSwapIntervalEXT() in WGL_EXT_swap_control) to know if VSync is activated.

My problem is, I cannot find the method for linux support. I have already checked SGI and ARB even if I don’t know so much about extensions[/QUOTE]

http://www.opengl.org/registry/ is your friend. See GLX_EXT_swap_control. NVidia supports this at least.

If you check the extension spec, you’ll see there is a GLX_SWAP_INTERVAL_EXT state on the drawable that can be queried via glXQueryDrawable() – see the extension spec for full code here. But why can’t you just cache this value off in your app space rather than query GLX / the X server for it. Likely to be faster (gets should generally be avoided for performance).

Also you might be interested in the GLX_EXT_swap_control_tear extension.