Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

locate_views calls xrLocateViews twice #117

Open
jdm opened this issue Jan 7, 2020 · 2 comments
Open

locate_views calls xrLocateViews twice #117

jdm opened this issue Jan 7, 2020 · 2 comments
Labels

Comments

@jdm
Copy link
Member

jdm commented Jan 7, 2020

The openxr crate uses the get_arr_init helper in locate_views. This means that it calls it first to determine how many views there are, then it calls it again with a vector of the right size to receive the view information. The XR sample app preallocates the right number of views an only calls it once every frame. We should look into whether we can do the same by dipping down into the system openxr crate.

@Manishearth
Copy link
Member

We can also update that code to determine the length based on the ViewConfigurationType

(We can also also have it return an enum of arrays instead so it doesn't allocate)

@Manishearth
Copy link
Member

Maybe better would be a locate_views_stereo() function (and a mono() one if people ask for it)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants