WIP: Add basic run as overlay functionality#268
WIP: Add basic run as overlay functionality#268jzulauf-lunarg wants to merge 1 commit intoKhronosGroup:mainfrom
Conversation
033ca4f to
9f7b536
Compare
Add option to run as overlay, with no other changes.
9f7b536 to
1aacd0e
Compare
| createInfo.next = m_graphicsPlugin->GetGraphicsBinding(); | ||
| createInfo.systemId = m_systemId; | ||
|
|
||
| XrSessionCreateInfoOverlayEXTX overlayCreateInfo = {XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX, nullptr, 0U, 0U}; |
There was a problem hiding this comment.
I remember OpenXR spec says the next of XrSessionCreateInfoOverlayEXTX can be nullptr, but the overlay will not show correct content on Android when next is nullptr with latest monado. In monado xrgears' new overlay PR, it uses graphic binding as next of overlayCreateInfo (https://gitlab.freedesktop.org/monado/demos/xrgears/-/merge_requests/10/diffs#575c3212e3fa074fbb40562ade4bdfad41bd74d7_593_598). Maybe hello_xr should use m_graphicsPlugin->GetGraphicsBinding() replace nullptr too.
There was a problem hiding this comment.
Yea both the graphics binding and XrSessionCreateInfoOverlayEXTX need to be in the next chain of XrSessionCreateInfo. Note that the validation layer has an issue there #264.
| [](const std::string& ext) { return ext.c_str(); }); | ||
|
|
||
| if (m_overlayApp) { | ||
| extensions.push_back(XR_EXTX_OVERLAY_EXTENSION_NAME); |
There was a problem hiding this comment.
Before adding overlay extension as enabled extensions list, should it need to check whether runtime supports this extension likes xrgears(https://gitlab.freedesktop.org/monado/demos/xrgears/-/merge_requests/10/diffs#575c3212e3fa074fbb40562ade4bdfad41bd74d7_130_136)?
| Log::Write(Log::Level::Info, | ||
| "HelloXr --graphics|-g <Graphics API> [--formfactor|-ff <Form factor>] [--viewconfig|-vc <View config>] " | ||
| "[--blendmode|-bm <Blend mode>] [--space|-s <Space>] [--verbose|-v]"); | ||
| "[--blendmode|-bm <Blend mode>] [--space|-s <Space>] [--overlay <Overlay placement>] [--verbose|-v]"); |
There was a problem hiding this comment.
Is there any chance to support those parameters for Android? Monado has two flavors, out of process and in process, and we can build two versions with different package name for different usage. Could hello_xr support similar flags to build two versions with different package name, one for normal usage, and one for overlay usage?
Add option to run as overlay, with no other changes.
Next steps, remove background when running as overlay.
When running with "overlay as service" LunarG/OpenXR-OverlayLayer#25 note update artifacts.