Skip to content
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

Mostly remove the use of the OPENXR ifdef #16344

Merged
merged 7 commits into from
Nov 6, 2022
Merged

Conversation

hrydgard
Copy link
Owner

@hrydgard hrydgard commented Nov 6, 2022

That is, build all the VR code regardless of platform. This is a first step towards making it possible to autodetect and use OpenXR dynamically on Windows - we don't want to build a separate exe or something like that.

This required adding a new dynamic OpenXR loader, so that things can link even when we're not using the static loaders provided by the headset makers.

The new dynamic loader is entirely untested but should work - if not I'll fix it when we actually start doing VR on desktop. In any case, it fixes linking.

@hrydgard hrydgard added the VR OpenXR VR support label Nov 6, 2022
@hrydgard hrydgard added this to the v1.14.0 milestone Nov 6, 2022
Comment on lines 311 to 314
// Unsupported in VR at the moment
if (IsVRBuild()) {
if (IsVREnabled()) {
return false;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Although fine for now, I think it'll end up making sense to reverse this onto where VR is configured (until VR is available with Vulkan.)

-[Unknown]

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, this is just a minimal step, how configuration works will be redone later.


#ifdef XR_NO_PROTOTYPES

PFN_xrGetInstanceProcAddr xrGetInstanceProcAddr;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: Prefer spaces for alignment, h too...?

-[Unknown]

Copy link
Contributor

@lvonasek lvonasek left a comment

Choose a reason for hiding this comment

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

I quickly tested this on Pico Neo 3 Link VR headset. It still works fine.

@hrydgard hrydgard merged commit 3e0b598 into master Nov 6, 2022
@hrydgard hrydgard deleted the remove-openxr-ifdef branch November 6, 2022 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VR OpenXR VR support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants