openxr changes

This commit is contained in:
awtterpip
2024-02-18 21:12:48 -06:00
parent 08e98dd051
commit 80d6cadadf
7 changed files with 782 additions and 659 deletions

View File

@@ -49,40 +49,6 @@ impl Default for XrExtensions {
}
}
macro_rules! unavailable_exts {
(
$exts:ty;
$(
$(
#[$meta:meta]
)*
$ident:ident
),*
$(,)?
) => {
impl $exts {
/// Returns any extensions needed by `required_exts` that aren't available in `self`
pub(crate) fn unavailable_exts(&self, required_exts: &Self) -> Vec<std::borrow::Cow<'static, str>> {
let mut exts = vec![];
$(
$(
#[$meta]
)*
if required_exts.0.$ident && !self.0.$ident {
exts.push(std::borrow::Cow::Borrowed(stringify!($ident)))
}
)*
for ext in required_exts.0.other.iter() {
if !self.0.other.contains(ext) {
exts.push(std::borrow::Cow::Owned(ext.clone()))
}
}
exts
}
}
};
}
macro_rules! bitor {
(
$exts:ty;
@@ -288,4 +254,4 @@ macro_rules! impl_ext {
};
}
impl_ext!(bitor, bitand, unavailable_exts);
impl_ext!(bitor, bitand);