47 #define OXR_XR_DEBUG_INSTANCE (*(uint64_t *)"oxrinst\0") 48 #define OXR_XR_DEBUG_SESSION (*(uint64_t *)"oxrsess\0") 49 #define OXR_XR_DEBUG_SPACE (*(uint64_t *)"oxrspac\0") 50 #define OXR_XR_DEBUG_PATH (*(uint64_t *)"oxrpath\0") 51 #define OXR_XR_DEBUG_ACTION (*(uint64_t *)"oxracti\0") 52 #define OXR_XR_DEBUG_SWAPCHAIN (*(uint64_t *)"oxrswap\0") 53 #define OXR_XR_DEBUG_ACTIONSET (*(uint64_t *)"oxraset\0") 54 #define OXR_XR_DEBUG_MESSENGER (*(uint64_t *)"oxrmess\0") 55 #define OXR_XR_DEBUG_SOURCESET (*(uint64_t *)"oxrsrcs\0") 56 #define OXR_XR_DEBUG_SOURCE (*(uint64_t *)"oxrsrc_\0") 86 #define XRT_MAX_HANDLE_CHILDREN 256 151 static inline XrInstance
154 return (XrInstance)inst;
159 const XrInstanceCreateInfo *createInfo,
165 XrInstanceProperties *instanceProperties);
173 struct timespec *timespecTime);
177 const struct timespec *timespecTime,
179 #endif // XR_USE_TIMESPEC 225 const char **out_str,
247 uint32_t num_subaction_paths,
248 const XrPath *subaction_paths,
264 static inline XrActionSet
267 return (XrActionSet)act_set;
273 const XrActionSetCreateInfo *createInfo,
279 static inline XrAction
282 return (XrAction)act;
288 const XrActionCreateInfo *createInfo,
294 const XrSessionActionSetsAttachInfo *bindInfo);
299 uint32_t countActionSets,
300 const XrActiveActionSet *actionSets);
307 XrActionStateBoolean *data);
314 XrActionStateFloat *data);
322 XrActionStateVector2f *data);
329 XrActionStatePose *data);
336 const XrHapticBaseHeader *hapticEvent);
379 size_t *num_bindings);
385 const XrInteractionProfileSuggestedBinding *suggestedBindings);
391 XrPath topLevelUserPath,
392 XrInteractionProfileState *interactionProfile);
398 const XrInputSourceLocalizedNameGetInfo *getInfo,
399 uint32_t bufferCapacityInput,
400 uint32_t *bufferCountOutput,
407 uint32_t sourceCapacityInput,
408 uint32_t *sourceCountOutput,
421 static inline XrSession
424 return (XrSession)sess;
430 const XrSessionCreateInfo *createInfo,
436 uint32_t formatCapacityInput,
437 uint32_t *formatCountOutput,
443 const XrSessionBeginInfo *beginInfo);
467 const XrViewLocateInfo *viewLocateInfo,
468 XrViewState *viewState,
469 uint32_t viewCapacityInput,
470 uint32_t *viewCountOutput,
476 XrFrameState *frameState);
484 const XrFrameEndInfo *frameEndInfo);
496 static inline XrSpace
497 oxr_space_to_openxr(
struct oxr_space *spc)
506 const XrActionSpaceCreateInfo *createInfo,
512 const XrReferenceSpaceCreateInfo *createInfo,
520 XrSpaceLocation *location);
525 XrReferenceSpaceType space,
526 XrReferenceSpaceType baseSpc,
540 static inline XrSwapchain
543 return (XrSwapchain)sc;
549 const XrSwapchainCreateInfo *,
562 static inline XrDebugUtilsMessengerEXT
565 return (XrDebugUtilsMessengerEXT)mssngr;
571 const XrDebugUtilsMessengerCreateInfoEXT *,
587 uint32_t num_systems,
588 XrFormFactor form_factor,
602 XrSystemId systemId);
613 XrSystemProperties *properties);
619 uint32_t viewConfigurationTypeCapacityInput,
620 uint32_t *viewConfigurationTypeCountOutput,
621 XrViewConfigurationType *viewConfigurationTypes);
626 XrViewConfigurationType viewConfigurationType,
627 uint32_t environmentBlendModeCapacityInput,
628 uint32_t *environmentBlendModeCountOutput,
629 XrEnvironmentBlendMode *environmentBlendModes);
635 XrViewConfigurationType viewConfigurationType,
636 XrViewConfigurationProperties *configurationProperties);
642 XrViewConfigurationType viewConfigurationType,
643 uint32_t viewCapacityInput,
644 uint32_t *viewCountOutput,
645 XrViewConfigurationView *views);
657 XrEventDataBuffer *eventData);
662 XrSessionState
state,
704 uint64_t *out_pose_timestamp_ns,
717 uint64_t *out_relation_timestamp_ns,
727 #ifdef XR_USE_GRAPHICS_API_OPENGL 728 #ifdef XR_USE_PLATFORM_XLIB 733 XrGraphicsBindingOpenGLXlibKHR
const *next,
735 #endif // XR_USE_PLATFORM_XLIB 740 const XrSwapchainCreateInfo *,
743 #endif // XR_USE_GRAPHICS_API_OPENGL 752 #ifdef XR_USE_GRAPHICS_API_VULKAN 757 uint32_t namesCapacityInput,
758 uint32_t *namesCountOutput,
764 uint32_t namesCapacityInput,
765 uint32_t *namesCountOutput,
771 XrGraphicsRequirementsVulkanKHR *graphicsRequirements);
777 VkInstance vkInstance,
778 PFN_vkGetInstanceProcAddr getProc,
779 VkPhysicalDevice *vkPhysicalDevice);
784 XrGraphicsBindingVulkanKHR
const *next,
790 const XrSwapchainCreateInfo *,
802 #ifdef XR_USE_PLATFORM_EGL 805 oxr_session_populate_egl(
struct oxr_logger *log,
807 XrGraphicsBindingEGLMND
const *next,
878 XrViewConfigurationView views[2];
880 XrEnvironmentBlendMode blend_modes[3];
883 #define MAKE_EXT_STATUS(mixed_case, all_caps) bool mixed_case; 1010 const XrSwapchainCreateInfo *,
1017 static inline XrResult
1018 oxr_session_success_result(
struct oxr_session *session)
1020 switch (session->
state) {
1021 case XR_SESSION_STATE_LOSS_PENDING:
return XR_SESSION_LOSS_PENDING;
1022 default:
return XR_SUCCESS;
1030 static inline XrResult
1031 oxr_session_success_focused_result(
struct oxr_session *session)
1033 switch (session->
state) {
1034 case XR_SESSION_STATE_LOSS_PENDING:
return XR_SESSION_LOSS_PENDING;
1035 case XR_SESSION_STATE_FOCUSED:
return XR_SUCCESS;
1036 default:
return XR_SESSION_NOT_FOCUSED;
1251 XrSwapchainImageBaseHeader *);
1255 const XrSwapchainImageAcquireInfo *,
1260 const XrSwapchainImageWaitInfo *);
1264 const XrSwapchainImageReleaseInfo *);
1281 char name[XR_MAX_ACTION_SET_NAME_SIZE];
1304 char name[XR_MAX_ACTION_NAME_SIZE];
float ipd_meters
IPD, to be expanded to a proper 3D relation.
Definition: oxr_objects.h:1001
XrResult oxr_session_populate_gl_xlib(struct oxr_logger *log, struct oxr_system *sys, XrGraphicsBindingOpenGLXlibKHR const *next, struct oxr_session *sess)
Definition: oxr_session_gl.c:31
XrPath htc_vive_pro
Definition: oxr_objects.h:941
XrResult oxr_action_enumerate_bound_sources(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, uint32_t sourceCapacityInput, uint32_t *sourceCountOutput, XrPath *sources)
Definition: oxr_binding.c:444
XrResult oxr_create_swapchain(struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **out_swapchain)
Definition: oxr_swapchain.c:107
A simple uint64_t key to a void pointer hashmap.
Definition: u_hashmap.cpp:22
XrPath left
Definition: oxr_objects.h:934
Can be one of 3 references or a space that are bound to actions.
Definition: oxr_objects.h:1202
XrResult oxr_source_get_pose_input(struct oxr_logger *log, struct oxr_session *sess, uint32_t key, const struct oxr_sub_paths *sub_paths, struct oxr_source_input **out_input)
Find the pose input for the set of sub_paths.
Definition: oxr_input.c:221
uint32_t act_key
Action key from which action this space was created from.
Definition: oxr_objects.h:1217
XrResult oxr_action_create(struct oxr_logger *log, struct oxr_action_set *act_set, const XrActionCreateInfo *createInfo, struct oxr_action **out_act)
Definition: oxr_input.c:141
bool lifecycle_verbose
Definition: oxr_objects.h:953
struct oxr_session * next
Definition: oxr_objects.h:971
XrResult oxr_path_only_get(struct oxr_logger *log, struct oxr_instance *inst, const char *str, size_t length, XrPath *out_path)
Only get the path for the given string if it exists.
Definition: oxr_path.c:171
Include all of the Vulkan headers in one place.
Hashmap for integer values header.
Session input source.
Definition: oxr_objects.h:1088
size_t num_inputs
Definition: oxr_objects.h:1064
XrResult oxr_action_sync_data(struct oxr_logger *log, struct oxr_session *sess, uint32_t countActionSets, const XrActiveActionSet *actionSets)
Definition: oxr_input.c:927
XrPath htc_vive_controller
Definition: oxr_objects.h:940
XrResult oxr_session_get_view_pose_at(struct oxr_logger *, struct oxr_session *sess, XrTime at_time, struct xrt_pose *)
Get the view space position at the given time in relation to the local or stage space.
Definition: oxr_session.c:187
XrPath gamepad
Definition: oxr_objects.h:993
A pose composed of a position and orientation.
Definition: xrt_defines.h:231
struct xrt_compositor * compositor
Definition: oxr_objects.h:969
struct xrt_instance * xinst
Definition: oxr_objects.h:908
XrResult oxr_session_begin(struct oxr_logger *log, struct oxr_session *sess, const XrSessionBeginInfo *beginInfo)
Definition: oxr_session.c:94
bool gamepad
Definition: oxr_objects.h:1080
enum xrt_device_name name
Enum identifier of the device.
Definition: xrt_device.h:205
void oxr_binding_find_bindings_from_key(struct oxr_logger *log, struct oxr_interaction_profile *profile, uint32_t key, struct oxr_binding *bindings[32], size_t *num_bindings)
Find all bindings that is the given action key is bound to.
Definition: oxr_binding.c:273
struct xrt_device * xdev
Definition: oxr_objects.h:1154
XrResult oxr_system_enumerate_view_confs(struct oxr_logger *log, struct oxr_system *sys, uint32_t viewConfigurationTypeCapacityInput, uint32_t *viewConfigurationTypeCountOutput, XrViewConfigurationType *viewConfigurationTypes)
Definition: oxr_system.c:233
XrFormFactor form_factor
Definition: oxr_objects.h:876
struct xrt_device * head
Definition: oxr_objects.h:866
XrResult oxr_action_get_current_interaction_profile(struct oxr_logger *log, struct oxr_session *sess, XrPath topLevelUserPath, XrInteractionProfileState *interactionProfile)
Definition: oxr_binding.c:401
XrPath path
Definition: oxr_objects.h:1045
XrViewConfigurationType view_config_type
Definition: oxr_objects.h:877
A output source pair of a xrt_output_name and a xrt_device.
Definition: oxr_objects.h:1152
XrResult oxr_swapchain_vk_create(struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **out_swapchain)
Definition: oxr_swapchain_vk.c:56
XrResult oxr_action_get_input_source_localized_name(struct oxr_logger *log, struct oxr_session *sess, const XrInputSourceLocalizedNameGetInfo *getInfo, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer)
Definition: oxr_binding.c:431
bool oxr_xdev_find_output(struct xrt_device *xdev, enum xrt_output_name name, struct xrt_output **out_output)
Return true if it finds an output of that name on this device.
Definition: oxr_xdev.c:63
Object that client program interact with.
Definition: oxr_objects.h:964
XrResult(* wait_image)(struct oxr_logger *, struct oxr_swapchain *, const XrSwapchainImageWaitInfo *)
Definition: oxr_objects.h:1258
State after successful oxr_handle_init.
Definition: oxr_objects.h:103
XrResult oxr_instance_get_properties(struct oxr_logger *log, struct oxr_instance *inst, XrInstanceProperties *instanceProperties)
Definition: oxr_instance.c:252
XrPath gamepad
Definition: oxr_objects.h:936
XrResult oxr_action_suggest_interaction_profile_bindings(struct oxr_logger *log, struct oxr_instance *inst, const XrInteractionProfileSuggestedBinding *suggestedBindings)
Definition: oxr_binding.c:349
void oxr_xdev_update(struct xrt_device *xdev)
Definition: oxr_xdev.c:34
struct xrt_device * left
Definition: oxr_objects.h:867
bool exiting
Definition: oxr_objects.h:975
struct oxr_system * sys
Definition: oxr_objects.h:968
XrResult oxr_instance_convert_time_to_timespec(struct oxr_logger *log, struct oxr_instance *inst, XrTime time, struct timespec *timespecTime)
Definition: oxr_instance.c:266
void *XR_MAY_ALIAS user_data
Opaque user data.
Definition: oxr_objects.h:1339
XrResult oxr_session_frame_begin(struct oxr_logger *log, struct oxr_session *sess)
Definition: oxr_session.c:407
struct oxr_handle_base * children[XRT_MAX_HANDLE_CHILDREN]
Array of children, if any.
Definition: oxr_objects.h:839
XrResult oxr_action_set_create(struct oxr_logger *log, struct oxr_instance *inst, const XrActionSetCreateInfo *createInfo, struct oxr_action_set **out_act_set)
Definition: oxr_input.c:98
uint32_t num_blend_modes
Definition: oxr_objects.h:879
struct xrt_device * right
Definition: oxr_objects.h:868
struct oxr_source_set * next
Next source set on this session.
Definition: oxr_objects.h:1100
A group of actions.
Definition: oxr_objects.h:1272
enum xrt_input_name * inputs
Definition: oxr_objects.h:1063
struct oxr_instance * inst
Onwer of this messenger.
Definition: oxr_objects.h:1327
XrResult oxr_create_messenger(struct oxr_logger *, struct oxr_instance *inst, const XrDebugUtilsMessengerCreateInfoEXT *, struct oxr_debug_messenger **out_mssngr)
Definition: oxr_messenger.c:42
bool debug_bindings
Definition: oxr_objects.h:956
XrResult oxr_handle_destroy(struct oxr_logger *log, struct oxr_handle_base *hb)
Destroy the handle's object, as well as all child handles recursively.
Definition: oxr_handle_base.c:211
uint32_t key
Unique key for the session hashmap.
Definition: oxr_objects.h:1287
XrPath google_daydream_controller
Definition: oxr_objects.h:939
XrPath microsoft_xbox_controller
Definition: oxr_objects.h:943
XrResult oxr_swapchain_gl_create(struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **out_swapchain)
Definition: oxr_swapchain_gl.c:80
Header defining a xrt HMD device.
bool boolean
Definition: oxr_objects.h:1122
size_t num_outputs
Definition: oxr_objects.h:1171
A relation with two spaces, includes velocity and acceleration.
Definition: xrt_defines.h:336
XrPath oculus_touch_controller
Definition: oxr_objects.h:945
Macros for generating extension-related tables and code and inspecting Monado's extension support...
struct oxr_session * sessions
Definition: oxr_objects.h:928
bool changed
Definition: oxr_objects.h:1128
A set of images used for rendering.
Definition: oxr_objects.h:1231
bool user
Definition: oxr_objects.h:1076
XrResult oxr_space_action_create(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, const XrActionSpaceCreateInfo *createInfo, struct oxr_space **out_space)
Definition: oxr_space.c:54
int released_index
Definition: oxr_objects.h:1244
char name[XR_MAX_ACTION_SET_NAME_SIZE]
Application supplied name of this action.
Definition: oxr_objects.h:1281
State after successful oxr_handle_destroy.
Definition: oxr_objects.h:106
Logger struct that lives on the stack, one for each call client call.
Definition: oxr_logger.h:36
XrPath head
Definition: oxr_objects.h:933
State during/before oxr_handle_init, or after failure.
Definition: oxr_objects.h:100
Kind of bespoke hashset implementation, where the user is responsible for allocating and freeing the ...
Definition: u_hashset.cpp:24
bool attached
Has this action set been attached.
Definition: oxr_objects.h:1284
XrResult oxr_space_locate(struct oxr_logger *log, struct oxr_space *spc, struct oxr_space *baseSpc, XrTime time, XrSpaceLocation *location)
Definition: oxr_space.c:327
XrResult oxr_system_fill_in(struct oxr_logger *log, struct oxr_instance *inst, XrSystemId systemId, struct oxr_system *sys, struct xrt_device **xdevs, size_t num_xdevs)
Definition: oxr_system.c:105
XrResult(* release_image)(struct oxr_logger *, struct oxr_swapchain *, const XrSwapchainImageReleaseInfo *)
Definition: oxr_objects.h:1262
uint64_t debug
Magic (per-handle-type) value for debugging.
Definition: oxr_objects.h:829
uint32_t time
Definition: vive_protocol.h:211
uint32_t key
Unique key for the session hashmap.
Definition: oxr_objects.h:1307
XrResult oxr_space_reference_create(struct oxr_logger *log, struct oxr_session *sess, const XrReferenceSpaceCreateInfo *createInfo, struct oxr_space **out_space)
Definition: oxr_space.c:82
size_t num_xdevs
Definition: oxr_objects.h:872
XrResult oxr_instance_create(struct oxr_logger *log, const XrInstanceCreateInfo *createInfo, struct oxr_instance **out_inst)
Definition: oxr_instance.c:99
#define MAKE_EXT_STATUS(mixed_case, all_caps)
Definition: oxr_objects.h:883
oxr_handle_state
State of a handle base, to reduce likelihood of going "boom" on out-of-order destruction or other uns...
Definition: oxr_objects.h:97
bool left
Definition: oxr_objects.h:1078
XrResult oxr_path_get_or_create(struct oxr_logger *log, struct oxr_instance *inst, const char *str, size_t length, XrPath *out_path)
Get the path for the given string if it exists, or create it if it does not.
Definition: oxr_path.c:141
size_t num_keys
Definition: oxr_objects.h:1061
XrDebugUtilsMessageSeverityFlagsEXT message_severities
Severities to submit to this messenger.
Definition: oxr_objects.h:1330
bool head
Definition: oxr_objects.h:1077
xrt_output_name
Name of a output with a baked in type.
Definition: xrt_defines.h:532
XrResult oxr_instance_convert_timespec_to_time(struct oxr_logger *log, struct oxr_instance *inst, const struct timespec *timespecTime, XrTime *time)
Definition: oxr_instance.c:276
To carry around a sementic selection of sub action paths.
Definition: oxr_objects.h:1073
XrResult oxr_session_views(struct oxr_logger *log, struct oxr_session *sess, const XrViewLocateInfo *viewLocateInfo, XrViewState *viewState, uint32_t viewCapacityInput, uint32_t *viewCountOutput, XrView *views)
Definition: oxr_session.c:287
Definition: oxr_objects.h:114
XrReferenceSpaceType type
What kind of reference space is this, if any.
Definition: oxr_objects.h:1214
Common swapchain base.
Definition: xrt_compositor.h:75
struct oxr_session * sess
Onwer of this space.
Definition: oxr_objects.h:1208
struct oxr_instance * inst
Definition: oxr_objects.h:861
XrResult oxr_space_ref_relation(struct oxr_logger *log, struct oxr_session *sess, XrReferenceSpaceType space, XrReferenceSpaceType baseSpc, XrTime time, struct xrt_space_relation *out_relation)
This returns only the relation between two spaces without any of the app given relations applied...
Definition: oxr_space.c:135
XrResult oxr_session_create(struct oxr_logger *log, struct oxr_system *sys, const XrSessionCreateInfo *createInfo, struct oxr_session **out_session)
Definition: oxr_session.c:667
XrResult oxr_session_enumerate_formats(struct oxr_logger *log, struct oxr_session *sess, uint32_t formatCapacityInput, uint32_t *formatCountOutput, int64_t *formats)
Definition: oxr_session.c:70
XrResult oxr_path_get_string(struct oxr_logger *log, struct oxr_instance *inst, XrPath path, const char **out_str, size_t *out_length)
Get a pointer and length of the internal string.
Definition: oxr_path.c:192
XrResult oxr_vk_get_requirements(struct oxr_logger *log, struct oxr_system *sys, XrGraphicsRequirementsVulkanKHR *graphicsRequirements)
Definition: oxr_vulkan.c:54
The state of a action input source.
Definition: oxr_objects.h:1108
XrResult oxr_vk_get_device_exts(struct oxr_logger *log, struct oxr_system *sys, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString)
Definition: oxr_vulkan.c:40
Definition: oxr_objects.h:115
XrResult oxr_action_apply_haptic_feedback(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, const XrHapticBaseHeader *hapticEvent)
Definition: oxr_input.c:1205
size_t num_bindings
Definition: oxr_objects.h:1047
XrResult oxr_destroy_messenger(struct oxr_logger *log, struct oxr_debug_messenger *mssngr)
float y
Definition: oxr_objects.h:1119
XrPath khr_simple_controller
Definition: oxr_objects.h:938
Time-keeping state structure.
Definition: u_time.cpp:46
Header defining a XRT graphics provider.
bool actionsAttached
Has xrAttachSessionActionSets been called?
Definition: oxr_objects.h:984
XrPath left
Currently bound interaction profile.
Definition: oxr_objects.h:990
struct xrt_swapchain * swapchain
Compositor swapchain.
Definition: oxr_objects.h:1240
size_t num_profiles
Definition: oxr_objects.h:926
void oxr_xdev_get_pose_at(struct oxr_logger *log, struct oxr_instance *inst, struct xrt_device *xdev, enum xrt_input_name name, XrTime at_time, uint64_t *out_pose_timestamp_ns, struct xrt_pose *out_pose)
Returns the pose of the named input from the device, if the pose isn't valid uses the device offset i...
Definition: oxr_xdev.c:139
XrSessionState state
Definition: oxr_objects.h:973
XrTime timestamp
When was this last changed.
Definition: oxr_objects.h:1131
XrResult oxr_vk_get_instance_exts(struct oxr_logger *log, struct oxr_system *sys, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString)
Definition: oxr_vulkan.c:26
struct u_hashmap_int * act_sets
Definition: oxr_objects.h:977
struct oxr_source_set * src_set_list
List of created source sets.
Definition: oxr_objects.h:981
XrResult oxr_poll_event(struct oxr_logger *log, struct oxr_instance *inst, XrEventDataBuffer *eventData)
Definition: oxr_event.c:137
XrPath right
Definition: oxr_objects.h:935
struct oxr_session * sess
Onwer of this swapchain.
Definition: oxr_objects.h:1237
bool frame_started
Definition: oxr_objects.h:974
XrResult oxr_session_attach_action_sets(struct oxr_logger *log, struct oxr_session *sess, const XrSessionActionSetsAttachInfo *bindInfo)
Definition: oxr_input.c:877
size_t num_inputs
Definition: oxr_objects.h:1167
int acquired_index
Actual state tracked! :D.
Definition: oxr_objects.h:1243
Header defining the tracking system integration in Monado.
XrResult oxr_system_enumerate_blend_modes(struct oxr_logger *log, struct oxr_system *sys, XrViewConfigurationType viewConfigurationType, uint32_t environmentBlendModeCapacityInput, uint32_t *environmentBlendModeCountOutput, XrEnvironmentBlendMode *environmentBlendModes)
Definition: oxr_system.c:246
Common compositor base.
Definition: xrt_compositor.h:169
A single action.
Definition: oxr_objects.h:1295
bool active
Definition: oxr_objects.h:1125
XrResult oxr_system_select(struct oxr_logger *log, struct oxr_system **systems, uint32_t num_systems, XrFormFactor form_factor, struct oxr_system **out_selected)
Definition: oxr_system.c:42
float x
Definition: oxr_objects.h:1113
bool debug_views
Definition: oxr_objects.h:954
XrResult oxr_session_end(struct oxr_logger *log, struct oxr_session *sess)
Definition: oxr_session.c:127
XrResult oxr_action_get_boolean(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStateBoolean *data)
Definition: oxr_input.c:1070
const char * oxr_handle_state_to_string(enum oxr_handle_state state)
Returns a human-readable label for a handle state.
Definition: oxr_handle_base.c:43
XrResult(* acquire_image)(struct oxr_logger *, struct oxr_swapchain *, const XrSwapchainImageAcquireInfo *, uint32_t *)
Definition: oxr_objects.h:1253
Definition: oxr_objects.h:117
oxr_sub_action_path
Sub action paths.
Definition: oxr_objects.h:112
Definition: oxr_objects.h:116
XrResult oxr_session_frame_wait(struct oxr_logger *log, struct oxr_session *sess, XrFrameState *frameState)
Definition: oxr_session.c:374
XrResult oxr_session_request_exit(struct oxr_logger *log, struct oxr_session *sess)
Definition: oxr_session.c:159
struct oxr_handle_base * parent
Pointer to this object's parent handle holder, if any.
Definition: oxr_objects.h:834
Definition: oxr_event.c:21
XrPath * paths
Definition: oxr_objects.h:1055
XrPath oculus_go_controller
Definition: oxr_objects.h:944
#define XRT_MAX_HANDLE_CHILDREN
Definition: oxr_objects.h:86
XrResult oxr_system_get_view_conf_properties(struct oxr_logger *log, struct oxr_system *sys, XrViewConfigurationType viewConfigurationType, XrViewConfigurationProperties *configurationProperties)
Definition: oxr_system.c:261
XrPath head
Definition: oxr_objects.h:992
bool debug_spaces
Definition: oxr_objects.h:955
XrResult oxr_system_verify_id(struct oxr_logger *log, const struct oxr_instance *inst, XrSystemId systemId)
Definition: oxr_system.c:76
struct oxr_session * sess
Owning session.
Definition: oxr_objects.h:1094
XrResult oxr_event_push_XrEventDataSessionStateChanged(struct oxr_logger *log, struct oxr_session *sess, XrSessionState state, XrTime time)
Definition: oxr_event.c:109
struct oxr_source_output * outputs
Definition: oxr_objects.h:1172
void oxr_xdev_destroy(struct xrt_device **xdev_ptr)
Definition: oxr_xdev.c:21
Session input source.
Definition: oxr_objects.h:1180
void * oxr_path_get_attached(struct oxr_logger *log, struct oxr_instance *inst, XrPath path)
Definition: oxr_path.c:129
enum xrt_output_name * outputs
Definition: oxr_objects.h:1066
float static_prediction_s
Definition: oxr_objects.h:1003
void oxr_classify_sub_action_paths(struct oxr_logger *log, struct oxr_instance *inst, uint32_t num_subaction_paths, const XrPath *subaction_paths, struct oxr_sub_paths *sub_paths)
Helper function to classify sub_paths.
Definition: oxr_input.c:179
Single or multiple devices grouped together to form a system that sessions can be created from...
Definition: oxr_objects.h:859
Structure tracking which extensions are enabled for a given instance.
Definition: oxr_objects.h:889
struct u_hashmap_int * sources
Definition: oxr_objects.h:978
Definition: xrt_device.h:192
Include all of the openxr headers in one place.
Used to hold diverse child handles and ensure orderly destruction.
Definition: oxr_objects.h:826
void * hack
Definition: oxr_objects.h:905
struct oxr_event * next_event
Definition: oxr_objects.h:923
Main object that ties everything together.
Definition: oxr_objects.h:899
struct oxr_event * last_event
Definition: oxr_objects.h:922
size_t num_outputs
Definition: oxr_objects.h:1067
XrResult oxr_action_get_vector2f(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStateVector2f *data)
Definition: oxr_input.c:1116
bool oxr_xdev_find_input(struct xrt_device *xdev, enum xrt_input_name name, struct xrt_input **out_input)
Return true if it finds an input of that name on this device.
Definition: oxr_xdev.c:42
void oxr_xdev_get_relation_at(struct oxr_logger *log, struct oxr_instance *inst, struct xrt_device *xdev, enum xrt_input_name name, XrTime at_time, uint64_t *out_relation_timestamp_ns, struct xrt_space_relation *out_relation)
Returns the relation of the named input from the device, always ensures that position and orientation...
Definition: oxr_xdev.c:104
XrResult oxr_action_stop_haptic_feedback(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths)
Definition: oxr_input.c:1246
XrResult oxr_session_populate_vk(struct oxr_logger *log, struct oxr_system *sys, XrGraphicsBindingVulkanKHR const *next, struct oxr_session *sess)
Definition: oxr_session_vk.c:25
XrDebugUtilsMessageTypeFlagsEXT message_types
Types to submit to this messenger.
Definition: oxr_objects.h:1333
Debug object created by the client program.
Definition: oxr_objects.h:1321
struct u_hashset * path_store
Path store, for looking up paths.
Definition: oxr_objects.h:919
XrResult(* oxr_handle_destroyer)(struct oxr_logger *log, struct oxr_handle_base *hb)
Definition: oxr_objects.h:90
XrResult oxr_system_enumerate_view_conf_views(struct oxr_logger *log, struct oxr_system *sys, XrViewConfigurationType viewConfigurationType, uint32_t viewCapacityInput, uint32_t *viewCountOutput, XrViewConfigurationView *views)
Definition: oxr_system.c:296
This object acts as a root object for Monado, it either wraps a xrt_prober or forms a connection to a...
Definition: xrt_instance.h:34
XrResult oxr_action_get_vector1f(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStateFloat *data)
Definition: oxr_input.c:1093
bool any
Definition: oxr_objects.h:1075
struct oxr_action_set * act_set
Onwer of this messenger.
Definition: oxr_objects.h:1301
uint32_t * keys
Definition: oxr_objects.h:1060
A single interaction profile.
Definition: oxr_objects.h:1043
XrPath user
Definition: oxr_objects.h:932
PFN_xrDebugUtilsMessengerCallbackEXT user_callback
Callback function.
Definition: oxr_objects.h:1336
bool is_reference
Is this a reference space?
Definition: oxr_objects.h:1220
struct oxr_binding * bindings
Definition: oxr_objects.h:1046
void oxr_find_profile_for_device(struct oxr_logger *log, struct oxr_instance *inst, struct xrt_device *xdev, struct oxr_interaction_profile **out_p)
Find the best matching profile for the given xrt_device.
Definition: oxr_binding.c:228
XrResult oxr_session_frame_end(struct oxr_logger *log, struct oxr_session *sess, const XrFrameEndInfo *frameEndInfo)
Definition: oxr_session.c:447
size_t num_paths
Definition: oxr_objects.h:1056
A single HMD or input device.
Definition: xrt_device.h:202
XrResult oxr_system_get_properties(struct oxr_logger *log, struct oxr_system *sys, XrSystemProperties *properties)
Definition: oxr_system.c:208
XrResult oxr_vk_get_physical_device(struct oxr_logger *log, struct oxr_instance *inst, struct oxr_system *sys, VkInstance vkInstance, PFN_vkGetInstanceProcAddr getProc, VkPhysicalDevice *vkPhysicalDevice)
Definition: oxr_vulkan.c:70
XrActionType action_type
Type the action this source was created from is.
Definition: oxr_objects.h:1186
oxr_handle_destroyer destroy
Destroy the object this handle refers to.
Definition: oxr_objects.h:849
struct oxr_interaction_profile ** profiles
Definition: oxr_objects.h:925
#define OXR_EXTENSION_SUPPORT_GENERATE(_)
Call this, passing a macro taking two parameters, to generate tables, code, etc.
Definition: oxr_extension_support.h:127
bool right
Definition: oxr_objects.h:1079
struct oxr_source_input * inputs
Definition: oxr_objects.h:1168
int64_t stop_output_time
Definition: oxr_objects.h:1170
XrPath right
Definition: oxr_objects.h:991
XrResult oxr_system_get_by_id(struct oxr_logger *log, struct oxr_instance *inst, XrSystemId systemId, struct oxr_system **system)
Definition: oxr_system.c:88
void oxr_path_destroy_all(struct oxr_logger *log, struct oxr_instance *inst)
Destroy all paths that the instance has created.
Definition: oxr_path.c:215
xrt_input_name
Name of a input with a baked in type.
Definition: xrt_defines.h:421
enum oxr_handle_state state
Current handle state.
Definition: oxr_objects.h:844
XrPath valve_index_controller
Definition: oxr_objects.h:946
void oxr_binding_destroy_all(struct oxr_logger *log, struct oxr_instance *inst)
Free all memory allocated by the binding system.
Definition: oxr_binding.c:308
XrResult oxr_action_get_pose(struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStatePose *data)
Definition: oxr_input.c:1139
struct oxr_instance * inst
Onwer of this messenger.
Definition: oxr_objects.h:1278
struct time_state * timekeeping
Definition: oxr_objects.h:916
Definition: oxr_objects.h:118
XrPath microsoft_motion_controller
Definition: oxr_objects.h:942
XrPath mnd_ball_on_stick_controller
Definition: oxr_objects.h:947
XrResult(* enumerate_images)(struct oxr_logger *, struct oxr_swapchain *, uint32_t, XrSwapchainImageBaseHeader *)
Definition: oxr_objects.h:1248
XrSystemId systemId
Definition: oxr_objects.h:874
XrActionType action_type
Type this action was created with.
Definition: oxr_objects.h:1310
Interaction profile binding state.
Definition: oxr_objects.h:1053
A set of inputs for a single sub action path.
Definition: oxr_objects.h:1163
void oxr_session_poll(struct oxr_session *sess)
Definition: oxr_session.c:179