-
Notifications
You must be signed in to change notification settings - Fork 68
Package header files needed for IXrContext.h usage (OpenXR + UWP) #163
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
3d5878e
add additional items
711c24d
try and decrease precompiled header size for BabylonReactNative
e6d5b46
update pch.h definition
842bb56
complete merge
e90c103
include header files for extension
8c9b7ed
include newer commits
d27485c
fix napi-jsi build break
0a4ecac
move openxr header into babylonreactnative repo
3d0043f
move back to main repo
2198113
move to newer commit
c9550cc
Merge branch 'master' of https://github.com/babylonjs/babylonreactnat…
c40745e
Update Package/gulpfile.js
chrisfromwork d461f62
reduce number of gulp tasks
5031591
Merge branch 'xrcontext' of https://github.com/chrisfromwork/babylonr…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Modules/@babylonjs/react-native-windows/windows/BabylonReactNative/packages.config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| <?xml version="1.0" encoding="utf-8"?> | ||
| <packages> | ||
| <package id="Microsoft.Windows.CppWinRT" version="2.0.201102.2" targetFramework="native" /> | ||
| <package id="Microsoft.Windows.CppWinRT" version="2.0.210122.3" targetFramework="native" /> | ||
| </packages> |
6 changes: 6 additions & 0 deletions
6
Modules/@babylonjs/react-native-windows/windows/BabylonReactNative/pch.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
Modules/@babylonjs/react-native-windows/windows/include/XrContextHelperOpenXR.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| #pragma once | ||
|
|
||
| #if __has_include("jsi/jsi.h") | ||
| #include "jsi/jsi.h" | ||
| #include "IXrContextOpenXR.h" | ||
|
|
||
| namespace BabylonReactNative | ||
| { | ||
| bool TryGetXrContext(facebook::jsi::Runtime& jsiRuntime, const facebook::jsi::Value& xrSession, IXrContextOpenXR*& xrContext) | ||
| { | ||
| xrContext = nullptr; | ||
| if (!xrSession.isObject() || | ||
| !xrSession.asObject(jsiRuntime).hasProperty(jsiRuntime, "nativeXrContext") || | ||
| !xrSession.asObject(jsiRuntime).hasProperty(jsiRuntime, "nativeXrContextType") || | ||
| xrSession.asObject(jsiRuntime).getProperty(jsiRuntime, "nativeXrContextType").asString(jsiRuntime).utf8(jsiRuntime) != "OpenXR") | ||
| { | ||
| return false; | ||
| } | ||
|
|
||
| auto nativeExtensionPtr = static_cast<uintptr_t>(xrSession.asObject(jsiRuntime).getProperty(jsiRuntime, "nativeXrContext").asNumber()); | ||
| xrContext = reinterpret_cast<IXrContextOpenXR*>(nativeExtensionPtr); | ||
| return true; | ||
| } | ||
| } | ||
| #endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.