Ybalrid / OpenXR-API-Layer-Template

A CMake based template repository to create OpenXR layers in C++
MIT License
8 stars 4 forks source link

Awesome work - i need some information though #1

Closed TheBricktop closed 2 years ago

TheBricktop commented 2 years ago

Thank You for Your hard work with creating this repo, it seems like the only clear and understandable way of implementing custom api layers ive seen.

I have some questions about how to make it work for example with a arduino based imu for headtracking. In order to do that i should edit the template to somehow receive the data from the sensor (from serial probably) and then pipe it further to the function that is supposed to set the 3dof pose of the headset. Is it correct ? Is there some functions in openxr that are doing it ?

Ybalrid commented 2 years ago

@TheBricktop Yes, you could do that.

You will need to "layer" the xrLocateViews API, you can make an OpenXR application think that the position/orientation of the users eyes follow your custom IMU data.

You will need to force the OpenXR application you want to spoof the tracking to load your layer. This can be done by making your layer available as "implicit" on your system or for that application.

(info about this can be found by looking at the specification of the OpenXR loader as published by Khronos)

TheBricktop commented 2 years ago

Im finding my way through the specification but its a thick forest for me