Skip to content

WIP: Add basic run as overlay functionality#268

Closed
jzulauf-lunarg wants to merge 1 commit intoKhronosGroup:mainfrom
jzulauf-lunarg:zulauf_basic_overlay_option
Closed

WIP: Add basic run as overlay functionality#268
jzulauf-lunarg wants to merge 1 commit intoKhronosGroup:mainfrom
jzulauf-lunarg:zulauf_basic_overlay_option

Conversation

@jzulauf-lunarg
Copy link

@jzulauf-lunarg jzulauf-lunarg commented Aug 10, 2021

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.

@jzulauf-lunarg jzulauf-lunarg changed the title Add basic run as overlay functionality WIP: Add basic run as overlay functionality Aug 10, 2021
@jzulauf-lunarg jzulauf-lunarg force-pushed the zulauf_basic_overlay_option branch from 033ca4f to 9f7b536 Compare August 11, 2021 15:19
Add option to run as overlay, with no other changes.
@jzulauf-lunarg jzulauf-lunarg force-pushed the zulauf_basic_overlay_option branch from 9f7b536 to 1aacd0e Compare September 29, 2021 19:13
@jzulauf-lunarg jzulauf-lunarg marked this pull request as draft September 29, 2021 19:14
createInfo.next = m_graphicsPlugin->GetGraphicsBinding();
createInfo.systemId = m_systemId;

XrSessionCreateInfoOverlayEXTX overlayCreateInfo = {XR_TYPE_SESSION_CREATE_INFO_OVERLAY_EXTX, nullptr, 0U, 0U};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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]");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@jzulauf-lunarg jzulauf-lunarg deleted the zulauf_basic_overlay_option branch December 26, 2023 23:27
@jzulauf-lunarg jzulauf-lunarg restored the zulauf_basic_overlay_option branch December 26, 2023 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants