make OxrInitPlugin impl Default with the values from add_xr_plugin and made the ref_space_type public for the OxrReferenceSpacePlugin

Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
Schmarni
2024-05-08 19:11:17 +02:00
parent 44e909a4e1
commit cd5ab90733
3 changed files with 22 additions and 17 deletions

View File

@@ -36,20 +36,7 @@ pub fn add_xr_plugins<G: PluginGroup>(plugins: G) -> PluginGroupBuilder {
.disable::<RenderPlugin>()
.disable::<PipelinedRenderingPlugin>()
.add_before::<RenderPlugin, _>(XrSessionPlugin)
.add_before::<RenderPlugin, _>(OxrInitPlugin {
app_info: default(),
exts: {
let mut exts = OxrExtensions::default();
exts.enable_fb_passthrough();
exts.enable_hand_tracking();
exts
},
blend_modes: default(),
backends: default(),
formats: Some(vec![wgpu::TextureFormat::Rgba8UnormSrgb]),
resolutions: default(),
synchronous_pipeline_compilation: default(),
})
.add_before::<RenderPlugin, _>(OxrInitPlugin::default())
.add(OxrReferenceSpacePlugin::default())
.add(OxrRenderPlugin)
.add(OxrPassthroughPlugin)