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

Move swapchain image enumeration into openxr initialization #88

Closed
jdm opened this issue Nov 8, 2019 · 1 comment
Closed

Move swapchain image enumeration into openxr initialization #88

jdm opened this issue Nov 8, 2019 · 1 comment
Labels

Comments

@jdm
Copy link
Member

jdm commented Nov 8, 2019

Calling enumerate_images on the swapchains every frame is unnecessary:

webxr/webxr/openxr/mod.rs

Lines 501 to 505 in 824e416

// TODO: the enumeration only needs to happen at initialization, not every frame.
let left_swapchain_images = self.left_swapchain.enumerate_images().unwrap();
let left_image = left_swapchain_images[self.left_image as usize];
let right_swapchain_images = self.right_swapchain.enumerate_images().unwrap();
let right_image = right_swapchain_images[self.right_image as usize];
. This is wasted work when we could be rendering.

@jdm
Copy link
Member Author

jdm commented Apr 14, 2020

This happened.

@jdm jdm closed this as completed Apr 14, 2020
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