Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualSimonForsman

Posted 01 July 2013 - 06:38 AM

If this is an older NVIDIA card (which it looks like from the available extensions) then you should note the text in the NVIDIA control panel advising that for GL applications you should use the control panel for selecting vsync.

 

Despite this, I have seen some more recent NVIDIA cards where using WGL_EXT_swap_control does work, but there are a few gotchas with it.

 

First one is that the driver may be automatically chopping your extensions string.  It does this for compatibility with some older games (e.g. in the Quake series) where the extensions string was copied to a fixed size buffer, causing the game to crash if the extensions string was too long.  The driver may be mis-identifying your game as one that needs this attention and you can verify if this is the case by comparing your extensions string with e.g. that from the GL extensions viewer.  Unfortunately NVIDIA have removed the capability to control this behaviour from more recent drivers, so you're stuck with it.

 

Secondly, you may be able to access the WGL extensions by calling wglGetExtensionsStringEXT.  Check that for the presence of WGL_EXT_swap_control.

 

Thirdy, it's always an option to bypass the extensions string and just call wglGetProcAddress on wglSwapIntervalEXT - if it returns non-NULL for you then you should be able to make wglSwapIntervalEXT calls even despite it not being present in the extensions string (whether or not they work is another matter).

 

It's worth noting that this is absolutely nothing to do with the OS - this is all behaviour dictated by the driver.  Yes, the driver is OS-specific, but the wacky stuff is in the driver, not the OS.

 

WGL_EXT_swap_control works with nvidia GPUs as long as the user has set v-sync to "use the application settings"(or something equivalent, varies a bit between driver versions) in the control panel, if it is set to something else (adaptive, adaptive(half refresh rate) , Off, On, etc),  WGL_EXT_swap_control is ignored. (It is possible that nvidia hides the extension if the user has forced a setting for it (I know i would do that if i was nvidia atleast to show applications that it is pointless to display that option to the end user)


#1SimonForsman

Posted 01 July 2013 - 06:35 AM

If this is an older NVIDIA card (which it looks like from the available extensions) then you should note the text in the NVIDIA control panel advising that for GL applications you should use the control panel for selecting vsync.

 

Despite this, I have seen some more recent NVIDIA cards where using WGL_EXT_swap_control does work, but there are a few gotchas with it.

 

First one is that the driver may be automatically chopping your extensions string.  It does this for compatibility with some older games (e.g. in the Quake series) where the extensions string was copied to a fixed size buffer, causing the game to crash if the extensions string was too long.  The driver may be mis-identifying your game as one that needs this attention and you can verify if this is the case by comparing your extensions string with e.g. that from the GL extensions viewer.  Unfortunately NVIDIA have removed the capability to control this behaviour from more recent drivers, so you're stuck with it.

 

Secondly, you may be able to access the WGL extensions by calling wglGetExtensionsStringEXT.  Check that for the presence of WGL_EXT_swap_control.

 

Thirdy, it's always an option to bypass the extensions string and just call wglGetProcAddress on wglSwapIntervalEXT - if it returns non-NULL for you then you should be able to make wglSwapIntervalEXT calls even despite it not being present in the extensions string (whether or not they work is another matter).

 

It's worth noting that this is absolutely nothing to do with the OS - this is all behaviour dictated by the driver.  Yes, the driver is OS-specific, but the wacky stuff is in the driver, not the OS.

 

WGL_EXT_swap_control works with nvidia GPUs as long as the user has set v-sync to "use the application settings"(or something equivalent, varies a bit between driver versions) in the control panel, if it is set to something else (adaptive, adaptive(half refresh rate) , Off, On, etc),  WGL_EXT_swap_control is ignored.

 

IIRC the application settings defaults to v-sync being on so you normally can't enable v-sync using the swap control extension. (if its not on by default then the user have disabled it in the driver settings and your application won't be able to turn it on)


PARTNERS