bigwheels icon indicating copy to clipboard operation
bigwheels copied to clipboard

Remove the need for PPX_BUILD_XR in project level code

Open apazylbe opened this issue 1 year ago • 1 comments

For example in graphics benchmark app: https://github.com/google/bigwheels/blob/main/benchmarks/graphics_pipeline/GraphicsBenchmarkApp.cpp having to add PPX_BUILD_XR complicates code unnecessarily. We should define the XR functions with or without PPX_BUILD_XR and make sure they behave appropriately if PPX_BUILD_XR=0, we can still have PPX_BUILD_XR in application.cpp.

apazylbe avatar Jan 30 '24 19:01 apazylbe

Seems like a first step for this one would be to abstract away OpenXR from the XrComponent class in BW: We might want to have a generic class for BW, and 2 backends: one for OpenXR, and a "fake" one when OpenXR build is disabled. We should design it in a way a 3rd backend could be added, like openVR, even if that's not the goal.

Once we have this abstraction, the PPX_BUILD_XR should be possible to remove. The only build-time switch would be around the implementation we use (fake vs openXR)

Keenuts avatar Jan 31 '24 16:01 Keenuts