move to api crate

This commit is contained in:
awtterpip
2023-12-26 14:20:22 -06:00
parent 037f719329
commit ffa9e6d080
26 changed files with 565 additions and 1310 deletions

30
xr_api/src/backend/oxr.rs Normal file
View File

@@ -0,0 +1,30 @@
use crate::prelude::*;
pub struct OXrEntry(openxr::Entry);
impl EntryTrait for OXrEntry {
fn available_extensions(&self) -> Result<ExtensionSet> {
// self.0.enumerate_extensions();
Ok(ExtensionSet::default())
}
fn create_instance(&self, exts: ExtensionSet) -> Result<Instance> {
todo!()
}
}
pub struct OXrInstance(openxr::Instance);
impl InstanceTrait for OXrInstance {
fn entry(&self) -> Entry {
OXrEntry(self.0.entry().clone()).into()
}
fn enabled_extensions(&self) -> ExtensionSet {
todo!()
}
fn create_session(&self, info: SessionCreateInfo) -> Result<Session> {
todo!()
}
}