Skip to main content
Up and Coming
October 13, 2015

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.
    This topic has been closed for replies.

    3 replies

    Inspiring
    October 13, 2015
    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.
    Up and Coming
    October 13, 2015
    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.
    http://www.turbo-button.com SMS Racing • A Night at the Roculus • Floculus Bird
    Inspiring
    October 13, 2015
    Yep, it should be in 1.0 at the latest. It will probably be something like OVRManager.display.frequency.