Too much code is hidden in directory shared, away from sample sources to inhibit the study of the code
tilkinsc opened this issue · 3 comments
- Most if not all primary code is hidden away in Shared, people who don't use MSVS instead VSC have a hard time following along with ctrl clicking to go to the source
- Not everyone wants to develop with d3d on windows and your suggestion in the video upfront to define XR_USE_PLATFORM_WIN32 especially with mingw leads to IUnknown undefined errors and confusion
- Main entry point of the program is not obvious, a lot of the code can be condensed very readably in a single file (outside of pch)
- 3rd party libraries are in shared so I spent like 5-10 minutes checking for the official source for XrSceneLib and XrUtility but there wasn't any
This repo is a perfect example on why we have standards and conventions.
@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:
- 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.
- 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).
- 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.
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?
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.