WGL_EXT_swap_control extension present? to activate it?
in my multiplatform OpenGL application, i require WGL_EXT_swap_control extension capability.
I have it running properly on Linux and MacOSX.
In WinXP and Win7, glGetString(GL_EXTENSIONS) returns null (i still dont kwno why), so,
- how to know if WGL_EXT_swap_control extension is present?
- how to enable it?
glGetString(GL_EXTENSIONS) is usually only NULL when you have no current OpenGL context. Also WGL_EXT_swap_control is not a GL extension, but a WGL extension, so you should use wglGetExtensionsStringEXT to query if it is available.
Originally Posted by danipellex
This is the only WGL extension that is also available in the GL_EXTENSIONs for historical reasons, so your code would work, but better do it right.
As it is an WGL extension, it's also clear that it is not available on non-Windows OSes, but there is an equivalent GLX_EXT_swap_control extension.