bjornbytes / lovr

Lua Virtual Reality Framework
https://lovr.org
MIT License
2k stars 138 forks source link

IOS Builds #654

Closed prakhar-s-srivastava closed 1 year ago

prakhar-s-srivastava commented 1 year ago

Are there any plans on making this IOS compatible, The only thing stopping many ppl form using this is that no ios builds available

bjornbytes commented 1 year ago

There aren't any official plans at the moment. iOS isn't a very prevalent platform for VR, and doesn't support OpenXR or WebXR (yet?). If someone is really excited about running LÖVR on there and is able to implement/test, I'd definitely assist in integrating it into the framework though.

SugarRayLua commented 1 year ago

Hello!

With Apple's Vision Pro being released, are there any updated plans to consider portion LOVR to iOS? I use Love on iOS which works pretty well and nice to collaborate on Love projects with Windows, Linux, and Mac users. However, Love's 3D libraries are only in their infancy, and it looks like LOVR already has 3D capabilities which would be nice to use on projects.

Thanks for the consideration. :-)

bjornbytes commented 1 year ago

Although the Vision Pro can run iOS apps, I think LÖVR would be more inclined to support Vision OS if possible.

SugarRayLua commented 1 year ago

Thanks for update! :-)

salzig commented 2 months ago

What would be needed to support the avp?

bjornbytes commented 2 months ago

I don't know much about Apple Vision Pro development, but from this article it seems like you can render arbitrary content with Metal, which would be a good fit for LÖVR. MoltenVK should be able to take care of translating LÖVR's Vulkan calls to Metal.

Since AVP doesn't support OpenXR, LÖVR needs to add a new headset driver for it. LÖVR currently has headset drivers for OpenXR, WebXR, and a keyboard/mouse simulator, each in a C file here. The C API for a driver looks like this, although most of the methods are optional. An AVP headset driver would probably call into ARKit (which has a C API?), CompositorServices, etc.

Overall I think it would be very painful to map these objective C APIs onto LÖVR's HeadsetInterface, but it's probably not impossible. There are some alternative approaches I can think of as well:

If anyone knows more about AVP stuff, please correct me or add more info!

coderofsalvation commented 1 month ago

fwiw: no news about OpenXR, but webxr now works (no longer behind a browserflag), so I guess the webxr is safest bet. Performancewise WebXR is better these days with XR (Projection)Layers, and its USP is top-notch distribution (via URL).