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).