#[cfg(feature = "OpenXR")] pub mod openxrintegration; #[cfg(not(feature = "OpenXR"))] pub mod openxrintegration { use crate::Result; use vulkan_rs::prelude::*; use std::sync::Arc; use crate::prelude::*; pub struct OpenXRIntegration; impl OpenXRIntegration { pub fn new(_: ApplicationInfo) -> Result { panic!("Feature OpenXR is not enabled!") } pub fn activate_vulkan_instance_extensions( &self, _: &mut InstanceExtensions, ) -> Result<()> { unimplemented!() } pub fn activate_vulkan_device_extensions(&self, _: &mut DeviceExtensions) -> Result<()> { unimplemented!() } pub fn physical_device(&self, _: &Arc) -> Result { unimplemented!() } } impl std::fmt::Debug for OpenXRIntegration { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "OpenXRIntegration {{ }}") } } } #[cfg(feature = "OpenXR")] pub mod openxrrendercore; #[cfg(not(feature = "OpenXR"))] pub mod openxrrendercore { use crate::Result; use ui::prelude::*; use vulkan_rs::prelude::*; use std::sync::{Arc, Mutex}; use super::openxrintegration::OpenXRIntegration; use crate::prelude::*; use crate::RenderCoreCreateInfo; pub struct OpenXRRenderCore { _dummy: u32, } impl OpenXRRenderCore { pub fn new( _: &OpenXRIntegration, _: &Arc, _: &Arc>, _: RenderCoreCreateInfo, ) -> Result<(Self, TargetMode<()>)> { panic!("Feature OpenXR is not enabled!") } } impl RenderCore for OpenXRRenderCore { fn format(&self) -> VkFormat { unimplemented!() } fn resize(&mut self, _: u32, _: u32) -> Result<()> { unimplemented!() } fn next_frame(&mut self) -> Result { unimplemented!() } fn set_clear_color(&self, _: [f32; 4]) { unimplemented!() } // scene handling fn scene(&self) -> &Box { unimplemented!() } fn scene_mut(&mut self) -> &mut Box { unimplemented!() } // post process handling fn add_post_processing_routine(&self, _post_process: Arc) { unimplemented!() } fn remove_post_processing_routine(&self, _post_process: Arc) { unimplemented!() } fn clear_post_processing_routines(&self) { unimplemented!() } // getter fn image_count(&self) -> usize { unimplemented!() } fn images(&self) -> TargetMode>> { unimplemented!() } fn width(&self) -> u32 { unimplemented!() } fn height(&self) -> u32 { unimplemented!() } fn transformations(&self) -> Option<(VRTransformations, VRTransformations)> { unimplemented!() } } impl std::fmt::Debug for OpenXRRenderCore { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { write!(f, "OpenXRRenderCore {{ }}") } } }