Plugin developers, Beta 5 includes a few new VR-specific APIs in the XPLMDisplay header.

The complete list of VR-specific APIs is now:

I’ve updated the VR sample plugin to take advantage of all the new stuff here, minus the widget API—really, once you enable native widget windows, your widget window becomes “just another XPLM window” as far as the display APIs are concerned.

About Tyler Young

Tyler is a software developer for X-Plane. Among other projects, he was in charge of the X-Plane 11 user interface and the massive multiplayer implementation.

8 comments on “New VR APIs Are Available Now

  1. Hi Tyler,

    Thankyou for the updated docs as it helped me update Xchecklist that now resizes in VR just like it did in 2d.

    Bill

  2. I have tried to get Xchecklist window into VR but not having any luck. I call this with a menu selection of open checklist.

    void xcvr_create_gui_widget_window() {
    XPGetWidgetUnderlyingWindow(xcvr_widget_window);
    vr_is_enabled = XPLMGetDatai(g_vr_dref);
    XPLMSetWindowIsVisible(xcvr_widget_window,1);
    XPLMSetWindowPositioningMode(xcvr_widget_window, vr_is_enabled ? xplm_WindowVR : xplm_WindowPositionFree, -1);
    }

    Does this look like it should work or should I file a bug report?

    Thanks Bill

    1. XPGetWidgetUnderlyingWindow() returns the XPLMWindowID you need to pass to all the window manipulation APIs—passing a widget ID won’t do it.

      You want something like this:

      XPLMWindowID window = XPGetWidgetUnderlyingWindow(xcvr_widget_window);
      XPLMSetWindowIsVisible(window, 1);
      1. Thankyou that got it working and will be doing further testing and let you know how it goes.

        1. Here is my report and have the Xchecklist widget working with one issue remaining but think I know the issue,

          When we use the “Next” or “Previous” buttons to get another checklist page we use destroy widget and then create a new widget with the new info for the updated checklist page.

          The result of that is the updated checklist is attached to your headset so wondered if there was a way to remember where it was and put the updated checklist there? That is what I was doing with the X-Plane 11 new GUI windows but they are solid and the widget Xchecklist is translucent which is what I am looking for.

          Thanks Bill

          1. No… there’s no support currently for positioning a newly created window anywhere but attached to the HMD. Your best bet is to simply reconfigure the widget window that existed previously (rather than creating a new one).

Comments are closed.