View Full Version : Vsync... disable it with code?

Mitchell Hayenga
02-17-2001, 07:26 PM
Hey, I always remember seeing in my videocard setting that you can have vsync "on by default"... well, how do I change it off, since there is a default, it *should* be able to be changed...
I'm using glut to do my window managing(looked through the docs to see if it had a function, didnt have much luck) and I'm working under win2k(although I'd like a platform independent solution)...

02-17-2001, 11:19 PM
You'll have to check if there is this extension: WGL_EXT_swap_control
However I think that every opengl32.dll has this, but thisi is very platform dependant!
This is the code where I disable vsync...
'message' is a function that writes in a file for debug, you can remove it.

wglSwapIntervalEXT=( BOOL (APIENTRY*)(int) )wglGetProcAddress("wglSwapIntervalEXT");
if (wglSwapIntervalEXT!=NULL) {
message("Vsync disabled (wglSwapIntervalEXT)\n");
else {
message("Vsync unchanged (wglSwapIntervalEXT not found)\n");

Mitchell Hayenga
02-18-2001, 01:25 PM