cmbruns / pyopenxr

Unofficial python bindings for OpenXR access to VR and AR devices
Apache License 2.0
112 stars 9 forks source link

Fix GL example #42

Closed jherico closed 3 years ago

jherico commented 3 years ago

The generated enumerate_swapchain_images function does not work, because OpenXR expects a specific type of swapchain image that corresponds to the rendering API in use. In this case SwapchainImageOpenGLKHR is required. I've explicitly added that here in order to get a functional result, but the generator logic will have to have some way of dealing with this. I don't know how you'd pass in the type of array you want back and get that without need for subsequent casting.

I'm not sure why the ctor version of the graphics binding code doesn't work, but this PR changes it to initialize a blank object and then assign to the appropriate variables.

cmbruns commented 3 years ago

@jherico Thanks! This is awesome. I will review this tomorrow. I had just started to get to the bottom of that SwapchainImageOpenGLKHR business when I noticed your PR. I will take it from here.