1runeberg / OpenXRProvider_v2

Provides a simpler C++ interface to the OpenXR api. Also includes an optional render module introduced in Demo 5 (Hello PBR). Currently an active work in progress with testing done in both Android (Meta Quest), Win64 and Linux.
MIT License
31 stars 3 forks source link

Why only debug build produce correct exe? #5

Open comsyspro opened 1 month ago

comsyspro commented 1 month ago

I'm a beginner for such kind of VR programming and found your project on youtube. When I build for example "sample_05_hello_pbr" as Release build in VS 2022 the produced exe file is about 600kb and when running it, it only shows 1 line containing "... G'Day ..." and then exits. Only the Debug verison produces an exe file with about 2300kb and this file works like the exe in the prebuilt directory. So whats the problem? There are also other configurations like "MinSizeRel" and "RelWithDebInfo". What are they for and they also couldn't be build.

Could you also make an example for following case: I want to create a remote VR headset application. The remote GPU server produces a side-by-side or top-bottom video stream. This videostream is send to the client. The client is recieving this videostream and should now split it up for the left and right eye of the VR headset. The headset should now see the VR scene like when he were connected locally. How could you do that?

Could you give here some advice how to start here to achieve these steps? Or could you probably add another example which goes in this direction for playing video or showing images in the VR headset?

Thank you.

1runeberg commented 1 month ago

Hi @comsyspro - thanks for reaching out!

Re: Inconsistent exe build Make sure when you're building from VS2022, that you have the correct project setup as the startup project (right clickSamples > sample_05_hello_pbr > Set as Startup Project)

A debug build will export the C++ symbols and will also enable any debug asserts in the app. The vulkan renderer should also show more diagnostic info than in release. Otherwise though, the app functionality should be the same.

Re: Render streaming Are you referring to an app similar to Steam Link or Virtual Desktop? This is outside the scope of the library and will be an advanced undertaking if you are just starting out with render or vr programming itself.

In a first step I want to do it only with one fixed image (side-by-side with left and right eye) and show this in the VR headset Then when this works I want to try it with a video file (side-by-side with left and right eye) Lastly when this works I want to try it with a videostream from a remote GPU (side-by-side with left and right eye)

For "side-by-side" or singlepass rendering, you'll need to create a custom graphics pipeline (I believe the hidden worlds" sample shows how you can create your own custom graphics pipeline). Note however that the default uses image arrays which is arguably more efficient.

Note that your application only really needs to render to the correct eye swapchain images and the openxr runtime handles al lthe necessary modifications so they will look correctly in the user's headset.