Hello everyone.

The Mixed Reality Forums here are no longer being used or maintained.

There are a few other places we would like to direct you to for support, both from Microsoft and from the community.

The first way we want to connect with you is our mixed reality developer program, which you can sign up for at https://aka.ms/IWantMR.

For technical questions, please use Stack Overflow, and tag your questions using either hololens or windows-mixed-reality.

If you want to join in discussions, please do so in the HoloDevelopers Slack, which you can join by going to https://aka.ms/holodevelopers, or in our Microsoft Tech Communities forums at https://techcommunity.microsoft.com/t5/mixed-reality/ct-p/MicrosoftMixedReality.

And always feel free to hit us up on Twitter @MxdRealityDev.
Options

C++/CX, how to safely use new APIs but also run on older windows 10

I need my app to still run on the HoloLens. How do I do this

Code

      if(mStageReferenceFrame)
        mRenderer.reset(new Renderer(!HolographicDisplay::GetDefault()->IsOpaque, mStageReferenceFrame));
      else
        mRenderer.reset(new Renderer(!HolographicDisplay::GetDefault()->IsOpaque, mStationaryReferenceFrame));

Api HolographicDisplay::GetDefault()->IsOpaque only available on fall creators. How do I check that is is available before calling on my old HoloLens which crashes with Platform::ClassNotRegisteredException

I need to solve this problem before next weekend.

Answers

  • Options
    Anyone have any help on this one?
  • Options

    Not exactly sure on this one but if you're trying to figure out HoloLens vs immersive headsets you can use the

    Windows::Perception::Spatial::Surfaces::SpatialSurfaceObserver::IsSupported

    https://docs.microsoft.com/en-us/uwp/api/Windows.Perception.Spatial.Surfaces.SpatialSurfaceObserver

    Immersive headsets won't support this, but the HoloLens will.

    Dwight Goins
    CAO & Founder| Independent Architect | Trainer and Consultant | Sr. Enterprise Architect
    MVP | MCT | MCSD | MCPD | SharePoint TS | MS Virtual TS |Windows 8 App Store Developer | Linux Gentoo Geek | Raspberry Pi Owner | Micro .Net Developer | Kinect For Windows Device Developer
    http://dgoins.wordpress.com

  • Options

    No that's not what I'm asking. Out of time on this one as well, just going to require hololens to be on latest win10 before it can upgrade to this version package.

  • Options

    I found it. The solution is to get the api contract and test like so

    if(Windows::Foundation::Metadata::ApiInformation::IsApiContractPresent("Windows.Foundation.UniversalApiContract", 4, 0))
    
Sign In or Register to comment.