Forum Discussion
stupidn00b
10 years agoExplorer
Reading refresh rate of connected HMD
Is it currently possible to get the refresh rate of the connected HMD? For Gear VR versus PC, we would just detect platform, we need to be able to set our fixed timestep to match framerate separately for DK2 and eventual CV1 players.
Closest thing I've come up with is using Unity's VRDevice field to check if it's a DK2, and assume 90 FPS if it isn't, but that seems like it's prone for failure if newer HMDs come along with a higher refresh rate.
Closest thing I've come up with is using Unity's VRDevice field to check if it's a DK2, and assume 90 FPS if it isn't, but that seems like it's prone for failure if newer HMDs come along with a higher refresh rate.
3 Replies
Replies have been turned off for this discussion
- vrdavebOculus StaffRight now, the only supported way would be to DllImport ovr_GetFloat from LibOVRRT*.dll and do something like this:
1f / ovr_GetFloat(UnityEngine.VR.VRDevice.GetNativePtr(), "VsyncToNextVsync", 90f);
We will probably add this to OVRManager before too long. - stupidn00bExplorerThanks for the quick response. Would you guess this functionality will be introduced prior to SDK 1.0? I've already got this working with other SDKs, so I can stub in a dummy function for now and wait for the official support if it will be ready before launch.
- vrdavebOculus StaffYep, it should be in 1.0 at the latest. It will probably be something like OVRManager.display.frequency.
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
- 3 years ago