Forum Discussion
star14
9 years agoExplorer
OculusRoomTiny (GL) locked to 60hz
I have no issues running the OculusRoomTiny (GL) demo (which my simple engine is based on) on my desktop PC. However, on a new laptop I got (that runs all Oculus store stuff just fine) this demo is locked to 60hz, which is causing ASW to kick in.
When I run the OculusDebugTool, it shows the framerate fluctuating between the 45hz used by ASW and 60hz. It appears that every second or so, the runtime is trying to disable ASW and then failing to hit 90hz so re-enabling it. In any case, when I disable ASW with the keyboard shortcut the framerate is locked to 60hz.
I investigated this a fair amount and determined a few things: First, if I comment out the call to SwapBuffers() in the MainLoop function, the demo returns to the expected 90hz (though of course the mirror window doesn't update). This indicates that SwapBuffers() is blocking, which it should not be.
Second, the call "wglSwapIntervalEXT(0);" (also in MainLoop) does not have an effect. The return value of wglGetSwapIntervalEXT() is 1 both before and after this call.
After looking around a bit, I figured out that if I disable "G-Sync" in the NVIDIA Control Panel (the laptop is using an NVIDIA GTX 1070 with G-Sync) the problem goes away! So the issue appears to be that NVIDIA's OpenGL driver is preventing wglSwapIntervalEXT() from having an effect when G-Sync is enabled.
How can the OculusRoomTiny demo (and thus my engine) be changed to allow updating the mirror window without locking to 60hz when G-Sync is enabled (which it is by default)?
Appreciate any help!!
When I run the OculusDebugTool, it shows the framerate fluctuating between the 45hz used by ASW and 60hz. It appears that every second or so, the runtime is trying to disable ASW and then failing to hit 90hz so re-enabling it. In any case, when I disable ASW with the keyboard shortcut the framerate is locked to 60hz.
I investigated this a fair amount and determined a few things: First, if I comment out the call to SwapBuffers() in the MainLoop function, the demo returns to the expected 90hz (though of course the mirror window doesn't update). This indicates that SwapBuffers() is blocking, which it should not be.
Second, the call "wglSwapIntervalEXT(0);" (also in MainLoop) does not have an effect. The return value of wglGetSwapIntervalEXT() is 1 both before and after this call.
After looking around a bit, I figured out that if I disable "G-Sync" in the NVIDIA Control Panel (the laptop is using an NVIDIA GTX 1070 with G-Sync) the problem goes away! So the issue appears to be that NVIDIA's OpenGL driver is preventing wglSwapIntervalEXT() from having an effect when G-Sync is enabled.
How can the OculusRoomTiny demo (and thus my engine) be changed to allow updating the mirror window without locking to 60hz when G-Sync is enabled (which it is by default)?
Appreciate any help!!
2 Replies
- DeanOfTheDriverProtegeIt's not the g-sync option but the "Force Vsync On" option in the Nvidia control panel. Either set it to "Off" or "Default"
- star14ExplorerGood point - I am seeing a "Vertical sync" setting that gets changed from "On" to "Use the 3D application setting" when I turn off G-Sync, so it seems I could just change that setting instead.
Is there a way I can render to the mirror window using OpenGL that doesn't depend on this setting being set to the right value? Wouldn't want to rely on users changing the setting themselves.
Quick Links
- Horizon Developer Support
- Quest User Forums
- Troubleshooting Forum for problems with a game or app
- Quest Support for problems with your device
Other Meta Support
Related Content
- 6 months ago
- 9 years ago
- 3 months ago