Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
stupidn00b's avatar
stupidn00b
Explorer
10 years ago

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.

3 Replies

Replies have been turned off for this discussion
  • Right 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.
  • Thanks 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.
  • Yep, it should be in 1.0 at the latest. It will probably be something like OVRManager.display.frequency.