diff options
author | David Snopek <dsnopek@gmail.com> | 2023-05-09 23:29:13 +1000 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2024-03-13 17:53:15 -0500 |
commit | 308a6a4734f38f79ac505e41e6f61c51df111748 (patch) | |
tree | d8952063e94700e517f81328e28e73048f6cc428 /modules/openxr/openxr_api.h | |
parent | da945ce6266ce27ba63b6b08dc0eb2414594f7cb (diff) | |
download | redot-engine-308a6a4734f38f79ac505e41e6f61c51df111748.tar.gz |
OpenXR: Allow GDExtensions to provide multiple, ordered composition layers
Co-authored-by: Bastiaan Olij <mux213@gmail.com>
Diffstat (limited to 'modules/openxr/openxr_api.h')
-rw-r--r-- | modules/openxr/openxr_api.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/openxr/openxr_api.h b/modules/openxr/openxr_api.h index e1a04a0796..7ec622364b 100644 --- a/modules/openxr/openxr_api.h +++ b/modules/openxr/openxr_api.h @@ -287,6 +287,15 @@ private: RID get_interaction_profile_rid(XrPath p_path); XrPath get_interaction_profile_path(RID p_interaction_profile); + struct OrderedCompositionLayer { + const XrCompositionLayerBaseHeader *composition_layer; + int sort_order; + + _FORCE_INLINE_ bool operator()(const OrderedCompositionLayer &a, const OrderedCompositionLayer &b) const { + return a.sort_order < b.sort_order || (a.sort_order == b.sort_order && uint64_t(a.composition_layer) < uint64_t(b.composition_layer)); + } + }; + // state changes bool poll_events(); bool on_state_idle(); |