Page 1 of 1

OpenGL: turning off and on vsync

Posted: Sun Feb 15, 2004 8:57 am
by DarkDragon
Hello,

I heard, that you can turn off and on vsync with OpenGL. Do somebody know how I can do this?

Posted: Sun Feb 15, 2004 1:53 pm
by Num3
If you own a Nvidia board get Rivatuner, there is an option to disable Vsync for OpenGl and DirectX.

This is done inside the registry, but i don't know where.

Posted: Sun Feb 15, 2004 3:30 pm
by DarkDragon
Thanks, but I want to do this in the OpenGL-application.

Posted: Sun Feb 15, 2004 7:03 pm
by Blade
Standard OpenGL hasn't such feature.
Perhaps some hardware-specific extension has, but don't expect to work in many video cards...

Posted: Mon Feb 16, 2004 6:13 pm
by DarkDragon
ohh, thx.

Posted: Tue Feb 17, 2004 1:18 am
by techjunkie

Posted: Tue Feb 17, 2004 1:23 am
by techjunkie
or maybe this... The same thing really...
Use this extension if available:
wglSwapControl = (PFNWGLEXTSWAPCONTROLPROC) wglGetProcAddress("wglSwapIntervalEXT");
and this to set the retrace to 1, 0 disables vsync.

wglSwapControl(1);
From this forum,

http://www.opengl.org/discussion_boards ... 00178.html

Posted: Thu Feb 19, 2004 3:37 pm
by DarkDragon
thx, but I don't know what (PFNWGLEXTSWAPCONTROLPROC) is. I think it is a structure, but how is the structure build?
I mean:

Code: Select all

Structure
  Value1.l
  Value2.f
Endstructure
and why can't I use the command wglSwapControl() ???

Posted: Thu Feb 19, 2004 11:08 pm
by dmoc
"pfn..." pointer-to-function. It's an address returned by wglGetProcAddress() or something similar. Check out win sdk for "wgl" functions.