Virtual Reality library architecture discussion (continued from OpenVR Available. Convert?)

I think two things are overlooked sometimes:

  1. app state has ‘construction time’ as one of it’s lifecycle steps (just like any object but easy to overlook when you are thinking of real methods).
  2. app allows passing app states on its constructor.
1 Like

I’m coding VRApplication to handle starting in classic mode or VR mode, based on hardware detection, automatically without any code on the developer’s side. My goal is for virtually everything to be the same between classic & VR development. My VRApplication will handle everything possible in making what you write into a VR & non-VR app.

With that said, I appreciate anyone who takes the time to transform what I’m doing into something easier to incorporate into the main jME3 distribution, whether that is making it just an AppState or something else with a smaller footprint. I understand there are different needs & different architectures may be more fitting for those needs. Whatever I write, I’ll do my best to answer for if problems arise when converting to someone else’s repository.

If you want I’ll clean up what I did, and I’ll make a pull request on your project. You’ll be free to take it or not.
Though it’s been a long time since I pulled your project a lot of things may have changed :stuck_out_tongue:

Not much have changed since last week, my fork is running in an AppState and with regular jMonkeyEngine. In case anyone has those requirements. I have yet to test the GUI.
One problem I have is that once I’ve run the VR application, I can’t run without VR mode or any other non-VR class in the same project. Even other projects are affected. When starting, the application is running (logs), but the screen is all black.
I suspected it having to do with either swapbuffers or Pause on lost focus. Reverting them in settings works for other projects, but not the project having the VR lib.

Make sure “use custom distortion” is disabled from my VR library… I’ve noticed that creates “black” problems when not actually using VR. There also is a “disable swap buffers completely” VR option, make sure that isn’t enabled… also just make sure whatever final scene viewport is being sent to the display (OutputBuffer should be null), and not a texture (that’d be normally sent a compositor).