philpax / wgpu-openxr-example

a barebones example of how to integrate OpenXR with wgpu (Vulkan-only)
MIT License
49 stars 9 forks source link

Question: Why only Vulkan #8

Closed schell closed 1 year ago

schell commented 1 year ago

First of all thank you for this great example!

It's early in my reading but I'm wondering why not let wgpu choose the underlying device and then write a TryFrom impl or similar for the openxr state. Bear in mind I'm still skimming this repo and have not yet grokked it. Essentially, why go from openxr to wgpu instead of the other way around?

schell commented 1 year ago

Of now I see in the readme this is all planned for the future, so I'm guessing the answer to this question is "time constraints", lol. Thanks again :)

philpax commented 1 year ago

Great question! OpenXR needs to be the one to provide the device - there's no way to convert a wgpu device to an OpenXR device - so you have to individually support each API in the bridge.

I've not supported the other APIs as I only needed Vulkan for my use case, but I'd be happy to help someone implement the other APIs as required :)

schell commented 1 year ago

Thank you!