microsoft / OpenXR-MixedReality

OpenXR samples and preview headers for HoloLens and Windows Mixed Reality developers familiar with Visual Studio
https://aka.ms/openxr
MIT License
336 stars 96 forks source link

Too much code is hidden in directory shared, away from sample sources to inhibit the study of the code #75

Closed tilkinsc closed 2 years ago

tilkinsc commented 3 years ago

This repo is a perfect example on why we have standards and conventions.

yl-msft commented 3 years ago

@tilkinsc Thanks for your feedback. We are considering to refactor our samples to address your feedback here and make the sample code more searchable and less wrapped in shared directory.

If you are looking for core OpenXR samples that's easier to follow, here are some suggestions:

  1. The BasicXRApp is a simple sample with most openxr logic in a single c++ file OpenXrProgram.cpp. You can also reference to this channel 9 video to walk through this sample in detail.
  2. The hello_xr projection on Khronos OpenXR SDK Source repo is also a single file example that works with cmake and various graphics APIs (d3d, vulkan, GL).
  3. If you are trying to find a real single file example for openxr, this SingleFileExample project might be interesting to you.

The XrSceneLib and XrUtility are libraries we developed in this sample repo. 3rd party libraries are contained in "ext" folder.

The accidentally leaking IUnknown into libraries dependencies are bugs. We are fixing them and will try to bring these libraries to be usable for those who don't code on win32. We might miss certain pieces, and welcome you to contribute fixes if you have in hand.

tilkinsc commented 3 years ago

On OGL + Win32 I am having a bug where steam detects the program and launches with correct title and everything, but the ActionSet and Actions are showing nothing in the UI. In the event loop, I am getting XR_TYPE_EVENT_DATA_INTERACTION_PROFILE_CHANGED which I am not sure how to respond to, if I need to. I haven't yet implemented rendering with the swap chain. I gather the images and do nothing with them, surely that wouldn't be a problem?

yl-msft commented 3 years ago

I'm not sure if you are hitting a bug specific to Steam openxr runtime. You can try to run BasicXrApp and see if you hit similar behavior.

I cannot speculate how the SteamVR's UI works with ActionSet/Action. Maybe worth to find SteamVR forum or reddit to ask for help.