api changes

This commit is contained in:
awtterpip
2023-12-27 19:04:21 -06:00
parent ffa9e6d080
commit fd5323069f
8 changed files with 90 additions and 13 deletions

View File

@@ -2,6 +2,15 @@ use crate::prelude::*;
pub struct OXrEntry(openxr::Entry);
impl OXrEntry {
pub fn new() -> Self {
#[cfg(feature = "linked")]
return OXrEntry(openxr::Entry::linked());
#[cfg(not(feature = "linked"))]
return OXrEntry(unsafe { openxr::Entry::load().expect("Failed to load OpenXR runtime") });
}
}
impl EntryTrait for OXrEntry {
fn available_extensions(&self) -> Result<ExtensionSet> {
// self.0.enumerate_extensions();