Merge pull request #74 from Schmarni-Dev/polishing
expose sync pipeline comp, pipelined rendering experimental
This commit is contained in:
@@ -24,7 +24,7 @@ fn main() {
|
|||||||
app_info: XrAppInfo {
|
app_info: XrAppInfo {
|
||||||
name: "Bevy OXR Android Example".into(),
|
name: "Bevy OXR Android Example".into(),
|
||||||
},
|
},
|
||||||
enable_pipelined_rendering: false,
|
enable_pipelined_rendering: true,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
})
|
})
|
||||||
// .add_plugins(OpenXrDebugRenderer)
|
// .add_plugins(OpenXrDebugRenderer)
|
||||||
|
|||||||
15
src/lib.rs
15
src/lib.rs
@@ -51,7 +51,9 @@ pub struct OpenXrPlugin {
|
|||||||
pub reqeusted_extensions: XrExtensions,
|
pub reqeusted_extensions: XrExtensions,
|
||||||
pub prefered_blend_mode: XrPreferdBlendMode,
|
pub prefered_blend_mode: XrPreferdBlendMode,
|
||||||
pub app_info: XrAppInfo,
|
pub app_info: XrAppInfo,
|
||||||
|
/// Experimental might break stuff
|
||||||
pub enable_pipelined_rendering: bool,
|
pub enable_pipelined_rendering: bool,
|
||||||
|
pub synchronous_pipeline_compilation: bool,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Plugin for OpenXrPlugin {
|
impl Plugin for OpenXrPlugin {
|
||||||
@@ -100,14 +102,17 @@ impl Plugin for OpenXrPlugin {
|
|||||||
render_instance,
|
render_instance,
|
||||||
),
|
),
|
||||||
// Expose this? if yes we also have to set this in the non xr case
|
// Expose this? if yes we also have to set this in the non xr case
|
||||||
synchronous_pipeline_compilation: true,
|
synchronous_pipeline_compilation: self.synchronous_pipeline_compilation,
|
||||||
});
|
});
|
||||||
app.insert_resource(XrStatus::Disabled);
|
app.insert_resource(XrStatus::Disabled);
|
||||||
// app.world.send_event(StartXrSession);
|
// app.world.send_event(StartXrSession);
|
||||||
}
|
}
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
warn!("OpenXR Instance Failed to initialize: {}", err);
|
warn!("OpenXR Instance Failed to initialize: {}", err);
|
||||||
app.add_plugins(RenderPlugin::default());
|
app.add_plugins(RenderPlugin {
|
||||||
|
synchronous_pipeline_compilation: self.synchronous_pipeline_compilation,
|
||||||
|
..Default::default()
|
||||||
|
});
|
||||||
app.insert_resource(XrStatus::NoInstance);
|
app.insert_resource(XrStatus::NoInstance);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -256,7 +261,9 @@ pub struct DefaultXrPlugins {
|
|||||||
pub reqeusted_extensions: XrExtensions,
|
pub reqeusted_extensions: XrExtensions,
|
||||||
pub prefered_blend_mode: XrPreferdBlendMode,
|
pub prefered_blend_mode: XrPreferdBlendMode,
|
||||||
pub app_info: XrAppInfo,
|
pub app_info: XrAppInfo,
|
||||||
|
/// Experimental might break stuff
|
||||||
pub enable_pipelined_rendering: bool,
|
pub enable_pipelined_rendering: bool,
|
||||||
|
pub synchronous_pipeline_compilation: bool,
|
||||||
}
|
}
|
||||||
impl Default for DefaultXrPlugins {
|
impl Default for DefaultXrPlugins {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
@@ -270,7 +277,8 @@ impl Default for DefaultXrPlugins {
|
|||||||
reqeusted_extensions: default(),
|
reqeusted_extensions: default(),
|
||||||
prefered_blend_mode: default(),
|
prefered_blend_mode: default(),
|
||||||
app_info: default(),
|
app_info: default(),
|
||||||
enable_pipelined_rendering: true,
|
enable_pipelined_rendering: false,
|
||||||
|
synchronous_pipeline_compilation: false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -297,6 +305,7 @@ impl PluginGroup for DefaultXrPlugins {
|
|||||||
reqeusted_extensions: self.reqeusted_extensions,
|
reqeusted_extensions: self.reqeusted_extensions,
|
||||||
app_info: self.app_info.clone(),
|
app_info: self.app_info.clone(),
|
||||||
enable_pipelined_rendering: self.enable_pipelined_rendering,
|
enable_pipelined_rendering: self.enable_pipelined_rendering,
|
||||||
|
synchronous_pipeline_compilation: self.synchronous_pipeline_compilation,
|
||||||
})
|
})
|
||||||
.add_after::<OpenXrPlugin, _>(XrInitPlugin)
|
.add_after::<OpenXrPlugin, _>(XrInitPlugin)
|
||||||
.add(XrInputPlugin)
|
.add(XrInputPlugin)
|
||||||
|
|||||||
Reference in New Issue
Block a user