Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Commit

Permalink
Update remoting to 2.8
Browse files Browse the repository at this point in the history
Supports scene understanding planes over remoting
  • Loading branch information
fieldsJacksonG authored May 11, 2022
1 parent e9de825 commit f6b6252
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion": 3,
"Version": 1,
"VersionName": "1.1.11",
"VersionName": "1.1.12",
"FriendlyName": "Microsoft OpenXR",
"Description": "The Microsoft OpenXR plugin is a game plugin which provides additional features available on Microsoft's Mixed Reality devices like the HoloLens 2 when using OpenXR.",
"Category": "Mixed Reality",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -424,13 +424,24 @@ namespace MicrosoftOpenXR
InInstance, "xrGetSceneMeshBuffersMSFT", (PFN_xrVoidFunction*)&Ext.xrGetSceneMeshBuffersMSFT));

// Check if Scene Understanding supports plane finding.
uint32 FeatureCount;
TArray<XrSceneComputeFeatureMSFT> SceneComputeFeatures;
XR_ENSURE(Ext.xrEnumerateSceneComputeFeaturesMSFT(InInstance, InSystem, 0, &FeatureCount, nullptr));
SceneComputeFeatures.AddUninitialized(FeatureCount);
XR_ENSURE(Ext.xrEnumerateSceneComputeFeaturesMSFT(InInstance, InSystem, FeatureCount, &FeatureCount, SceneComputeFeatures.GetData()));
if (UMicrosoftOpenXRFunctionLibrary::IsRemoting())
{
// When remoting, xrEnumerateSceneComputeFeaturesMSFT will only contain XR_SCENE_COMPUTE_FEATURE_PLANE_MSFT
// If the app remoting player is running when the editor starts.
// Otherwise, this will always be false even though the 2.8+ remoting runtime does support planes.
// Workaround this by forcing this flag to true when remoting.
bCanDetectPlanes = true;
}
else
{
uint32 FeatureCount;
TArray<XrSceneComputeFeatureMSFT> SceneComputeFeatures;
XR_ENSURE(Ext.xrEnumerateSceneComputeFeaturesMSFT(InInstance, InSystem, 0, &FeatureCount, nullptr));
SceneComputeFeatures.AddUninitialized(FeatureCount);
XR_ENSURE(Ext.xrEnumerateSceneComputeFeaturesMSFT(InInstance, InSystem, FeatureCount, &FeatureCount, SceneComputeFeatures.GetData()));

bCanDetectPlanes = SceneComputeFeatures.Contains(XR_SCENE_COMPUTE_FEATURE_PLANE_MSFT);
bCanDetectPlanes = SceneComputeFeatures.Contains(XR_SCENE_COMPUTE_FEATURE_PLANE_MSFT);
}

return InNext;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,16 @@ public NuGetModule(ReadOnlyTargetRules Target) : base(Target)
SafeCopy(Path.Combine(NugetFolder, RemotingFolderName, @"build\native\bin\x64\Desktop\Microsoft.Holographic.AppRemoting.OpenXr.dll"),
Path.Combine(BinariesFolder, "Microsoft.Holographic.AppRemoting.OpenXr.dll"));

SafeCopy(Path.Combine(NugetFolder, RemotingFolderName, @"build\native\bin\x64\Desktop\Microsoft.Holographic.AppRemoting.OpenXr.SU.dll"),
Path.Combine(BinariesFolder, "Microsoft.Holographic.AppRemoting.OpenXr.SU.dll"));

SafeCopy(Path.Combine(NugetFolder, RemotingFolderName, @"build\native\bin\x64\Desktop\RemotingXR.json"),
Path.Combine(BinariesFolder, "RemotingXR.json"));

PublicIncludePaths.Add(Path.Combine(NugetFolder, RemotingFolderName, @"build\native\include\openxr"));

RuntimeDependencies.Add(Path.Combine(BinariesFolder, "Microsoft.Holographic.AppRemoting.OpenXr.dll"));
RuntimeDependencies.Add(Path.Combine(BinariesFolder, "Microsoft.Holographic.AppRemoting.OpenXr.SU.dll"));
RuntimeDependencies.Add(Path.Combine(BinariesFolder, "RemotingXR.json"));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<package id="Microsoft.MixedReality.QR" version="0.5.2103" targetFramework="native" />
<package id="Microsoft.VCRTForwarders.140" version="1.0.7" targetFramework="native" />
<package id="Microsoft.Windows.CppWinRT" version="2.0.201217.4" targetFramework="native" />
<package id="Microsoft.Holographic.Remoting.OpenXr" version="2.7.5" targetFramework="native" />
<package id="Microsoft.Holographic.Remoting.OpenXr" version="2.8.0" targetFramework="native" />
<package id="Microsoft.Azure.SpatialAnchors.WinRT" version="2.7.0" targetFramework="native" />
<package id="Microsoft.Azure.ObjectAnchors.Runtime.WinRT" version="0.19.0" targetFramework="native" />
</packages>

0 comments on commit f6b6252

Please sign in to comment.