I am trying to disable vsync in OpenGl with WGL_EXT_swap_control using wglSwapIntervalEXT(int interval).
I am trying to include the wglext header but after much searchin
Just to include header #include "gl\wglext.h"
is not enough. You need to also register the extension to OpenGL. If you do not have a clue how to do it google for some tutorial but much much easier and safer is to use some extension registering library like GLEW see:
After successful glewInit();
call your extension should be available (if present on the gfx card/driver.
Without registering extensions you got access to only basic OpenGL 1.0 stuff.
So, a friend managed to figure this out without glew. So if anyone needs help with it this should be something similar to what you are looking for
void SetVSync(bool sync)
{
typedef BOOL(APIENTRY *PFNWGLSWAPINTERVALPROC)(int);
PFNWGLSWAPINTERVALPROC wglSwapIntervalEXT = 0;
const char *extensions = (char*)glGetString(GL_EXTENSIONS);
wglSwapIntervalEXT = (PFNWGLSWAPINTERVALPROC)wglGetProcAddress("wglSwapIntervalEXT");
if (wglSwapIntervalEXT)
wglSwapIntervalEXT(sync);
}