|
Monado OpenXR Runtime
|
Object that client program interact with. More...
#include <oxr/oxr_objects.h>


Public Member Functions | |
| XrResult | oxr_action_get_input_source_localized_name (struct oxr_logger *log, const struct oxr_path_store *store, struct oxr_session *sess, const XrInputSourceLocalizedNameGetInfo *getInfo, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer) |
| Get input source localized name. | |
| XrResult | oxr_action_get_boolean (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateBoolean *data) |
| XrResult | oxr_action_get_vector1f (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateFloat *data) |
| XrResult | oxr_action_get_vector2f (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateVector2f *data) |
| XrResult | oxr_action_get_pose (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStatePose *data) |
| XrResult | oxr_action_get_pose_input (struct oxr_session *sess, uint32_t act_key, const struct oxr_subaction_paths *subaction_paths_ptr, struct oxr_action_input **out_input) |
| Find the pose input for the set of subaction_paths. | |
| XrResult | oxr_session_attach_action_sets (struct oxr_logger *log, struct oxr_session *sess, const XrSessionActionSetsAttachInfo *bindInfo) |
| XrResult | oxr_action_sync_data (struct oxr_logger *log, struct oxr_session *sess, uint32_t countActionSets, const XrActiveActionSet *actionSets, const XrActiveActionSetPrioritiesEXT *activePriorities) |
| XrResult | oxr_action_enumerate_bound_sources (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, uint32_t sourceCapacityInput, uint32_t *sourceCountOutput, XrPath *sources) |
| XrResult | oxr_action_apply_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, const XrHapticBaseHeader *hapticEvent) |
| XrResult | oxr_action_stop_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths) |
Public Member Functions inherited from oxr_handle_base | |
| 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. | |
Data Fields | ||
| struct oxr_handle_base | handle | |
| Common structure for things referred to by OpenXR handles. | ||
| struct oxr_system * | sys | |
| enum oxr_session_graphics_ext | gfx_ext | |
| What graphics type was this session created with. | ||
| struct xrt_session * | xs | |
| The xrt_session backing this session. | ||
| struct xrt_compositor_native * | xcn | |
| Native compositor that is wrapped by client compositors. | ||
| struct xrt_compositor * | compositor | |
| struct oxr_session * | next | |
| XrSessionState | state | |
| XrViewConfigurationType | current_view_config_type | |
| This is set in xrBeginSession and is the primaryViewConfiguration argument, this is then used in xrEndFrame to know which view configuration the application is submitting it's frame in. | ||
| bool | has_ended_once | |
| There is a extra state between xrBeginSession has been called and the first xrEndFrame has been called. | ||
| bool | compositor_visible | |
| bool | compositor_focused | |
| int | active_wait_frames | |
| struct os_mutex | active_wait_frames_lock | |
| bool | frame_started | |
| bool | exiting | |
| struct { | ||
| int64_t waited | ||
| int64_t begun | ||
| } | frame_id | |
| struct oxr_frame_sync | frame_sync | |
| struct os_precise_sleeper | sleeper | |
| Used to implement precise extra sleeping in wait frame. | ||
| struct oxr_action_set_attachment * | act_set_attachments | |
| An array of action set attachments that this session owns. | ||
| size_t | action_set_attachment_count | |
| Length of oxr_session::act_set_attachments. | ||
| struct u_hashmap_int * | act_sets_attachments_by_key | |
| A map of action set key to action set attachments. | ||
| struct u_hashmap_int * | act_attachments_by_key | |
| A map of action key to action attachment. | ||
| struct oxr_interaction_profile_array | profiles_on_attachment | |
| Clone of all suggested binding profiles at the point of action set/session attachment. | ||
| uint64_t | dynamic_roles_generation_id | |
| Cache of the last known system roles generation_id. | ||
| struct os_mutex | sync_actions_mutex | |
| Protects access to dynamic_roles_generation_id during sync actions. | ||
| float | ipd_meters | |
| IPD, to be expanded to a proper 3D relation. | ||
| bool | frame_timing_spew | |
| Frame timing debug output. | ||
| uint32_t | frame_timing_wait_sleep_ms | |
| Extra sleep in wait frame. | ||
| XrResult(* | create_swapchain )(struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **) | |
| To pipe swapchain creation to right code. | ||
| bool | has_lost | |
| initial relation of head in "global" space. | ||
| XrPath | left | |
| XrPath | right | |
| XrPath | head | |
| XrPath | gamepad | |
| XrPath | eyes | |
Data Fields inherited from oxr_handle_base | ||
| uint64_t | debug | |
| Magic (per-handle-type) value for debugging. | ||
| struct oxr_handle_base * | parent | |
| Pointer to this object's parent handle holder, if any. | ||
| struct oxr_handle_base * | children [256] | |
| Array of children, if any. | ||
| enum oxr_handle_state | state | |
| Current handle state. | ||
| oxr_handle_destroyer | destroy | |
| Destroy the object this handle refers to. | ||
oxr_session.c | |
| static XrSession | oxr_session_to_openxr (struct oxr_session *sess) |
| To go back to a OpenXR object. | |
| static XrResult | oxr_session_success_result (struct oxr_session *session) |
| Returns XR_SUCCESS or XR_SESSION_LOSS_PENDING as appropriate. | |
| static XrResult | oxr_session_success_focused_result (struct oxr_session *session) |
| Returns XR_SUCCESS, XR_SESSION_LOSS_PENDING, or XR_SESSION_NOT_FOCUSED, as appropriate. | |
Additional Inherited Members | |
Protected Member Functions inherited from oxr_handle_base | |
| XrResult | oxr_handle_init (struct oxr_logger *log, struct oxr_handle_base *hb, uint64_t debug, oxr_handle_destroyer destroy, struct oxr_handle_base *parent) |
| Initialize a handle holder, and if a parent is specified, update its child list to include this handle. | |
Related Symbols inherited from oxr_handle_base | |
| typedef XrResult(* | oxr_handle_destroyer) (struct oxr_logger *log, struct oxr_handle_base *hb) |
| Function pointer type for a handle destruction function. | |
| XrResult | oxr_handle_allocate_and_init (struct oxr_logger *log, size_t size, uint64_t debug, oxr_handle_destroyer destroy, struct oxr_handle_base *parent, void **out) |
| Allocate some memory for use as a handle, and initialize it as a handle. | |
| #define | OXR_ALLOCATE_HANDLE(LOG, OUT, DEBUG, DESTROY, PARENT) oxr_handle_allocate_and_init(LOG, sizeof(*OUT), DEBUG, DESTROY, PARENT, (void **)&OUT) |
| Allocates memory for a handle and evaluates to an XrResult. | |
| #define | OXR_ALLOCATE_HANDLE_OR_RETURN(LOG, OUT, DEBUG, DESTROY, PARENT) |
| Allocate memory for a handle, returning in case of failure. | |
| const char * | oxr_handle_state_to_string (enum oxr_handle_state state) |
| Returns a human-readable label for a handle state. | |
Object that client program interact with.
Parent type/handle is oxr_instance
| XrResult oxr_action_get_input_source_localized_name | ( | struct oxr_logger * | log, |
| const struct oxr_path_store * | store, | ||
| struct oxr_session * | sess, | ||
| const XrInputSourceLocalizedNameGetInfo * | getInfo, | ||
| uint32_t | bufferCapacityInput, | ||
| uint32_t * | bufferCountOutput, | ||
| char * | buffer | ||
| ) |
Get input source localized name.
| log | Logger |
| path_store | Needed to look up path strings. |
| sess | Session. |
| getInfo | Input source localized name get info |
| bufferCapacityInput | Buffer capacity |
| bufferCountOutput | Buffer count output |
| buffer | Buffer |
References oxr_interaction_profile::localized_name, oxr_error(), and profiles_on_attachment.
| XrResult oxr_action_get_pose_input | ( | struct oxr_session * | sess, |
| uint32_t | act_key, | ||
| const struct oxr_subaction_paths * | subaction_paths_ptr, | ||
| struct oxr_action_input ** | out_input | ||
| ) |
Find the pose input for the set of subaction_paths.
References oxr_action_attachment::act_key, oxr_action_attachment::any_pose_subaction_path, OXR_FOR_EACH_VALID_SUBACTION_PATH, and oxr_action_attachment::sess.
| XrResult oxr_session_attach_action_sets | ( | struct oxr_logger * | log, |
| struct oxr_session * | sess, | ||
| const XrSessionActionSetsAttachInfo * | bindInfo | ||
| ) |
References oxr_action_set_attachment::act_attachments, oxr_action::act_set, oxr_action_attachment::act_set_attached, act_set_attachments, oxr_action_set_attachment::action_attachment_count, oxr_instance::action_context, action_set_attachment_count, oxr_handle_base::children, oxr_action_set::data, oxr_action_set_ref::ever_attached, oxr_action_set::handle, oxr_action_attachment::oxr_action_attachment_init(), profiles_on_attachment, oxr_action_set_attachment::sess, oxr_action_attachment::sess, oxr_instance_action_context::suggested_profiles, U_TYPED_ARRAY_CALLOC, and XRT_CAST_OXR_HANDLE_TO_PTR.
| struct u_hashmap_int* oxr_session::act_attachments_by_key |
A map of action key to action attachment.
The action attachments are actually owned by the action set attachments, but we own the action set attachments, so this is OK.
If non-null, this means action sets have been attached to this session, since this map points to oxr_action_attachment members of oxr_session::act_set_attachments elements.
Referenced by oxr_action_attachment::oxr_action_attachment_init(), and oxr_action_attachment::oxr_action_attachment_teardown().
| struct oxr_action_set_attachment* oxr_session::act_set_attachments |
An array of action set attachments that this session owns.
If non-null, this means action sets have been attached to this session.
Referenced by oxr_instance::oxr_action_get_current_interaction_profile(), oxr_action_sync_data(), oxr_session_attach_action_sets(), oxr_xrAttachSessionActionSets(), oxr_xrEnumerateBoundSourcesForAction(), and oxr_xrGetInputSourceLocalizedName().
| struct u_hashmap_int* oxr_session::act_sets_attachments_by_key |
A map of action set key to action set attachments.
If non-null, this means action sets have been attached to this session, since this map points to elements of oxr_session::act_set_attachments
Referenced by oxr_action_set_attachment::oxr_action_set_attachment_teardown().
| size_t oxr_session::action_set_attachment_count |
Length of oxr_session::act_set_attachments.
Referenced by oxr_action_sync_data(), and oxr_session_attach_action_sets().
| XrResult(* oxr_session::create_swapchain) (struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **) |
To pipe swapchain creation to right code.
Referenced by oxr_xrCreateSwapchain().
| XrViewConfigurationType oxr_session::current_view_config_type |
This is set in xrBeginSession and is the primaryViewConfiguration argument, this is then used in xrEndFrame to know which view configuration the application is submitting it's frame in.
Referenced by oxr_xrLocateViews(), and verify_projection_layer().
| uint64_t oxr_session::dynamic_roles_generation_id |
Cache of the last known system roles generation_id.
Referenced by oxr_action_sync_data().
| bool oxr_session::frame_timing_spew |
Frame timing debug output.
Referenced by oxr_session_frame_end(), and oxr_session_frame_wait().
| uint32_t oxr_session::frame_timing_wait_sleep_ms |
Extra sleep in wait frame.
Referenced by oxr_session_frame_wait().
| enum oxr_session_graphics_ext oxr_session::gfx_ext |
What graphics type was this session created with.
Referenced by oxr_xrCreateSwapchain().
| struct oxr_handle_base oxr_session::handle |
Common structure for things referred to by OpenXR handles.
Referenced by oxr_space_xdev_pose_create(), oxr_swapchain_common_create(), and oxr_xrDestroySession().
| bool oxr_session::has_ended_once |
There is a extra state between xrBeginSession has been called and the first xrEndFrame has been called.
These are to track this.
Referenced by oxr_session_request_exit().
| bool oxr_session::has_lost |
initial relation of head in "global" space.
Used as reference for local space.
| float oxr_session::ipd_meters |
IPD, to be expanded to a proper 3D relation.
| struct oxr_interaction_profile_array oxr_session::profiles_on_attachment |
Clone of all suggested binding profiles at the point of action set/session attachment.
oxr_session_attach_action_sets
Referenced by oxr_action_get_input_source_localized_name(), and oxr_session_attach_action_sets().
| struct os_precise_sleeper oxr_session::sleeper |
Used to implement precise extra sleeping in wait frame.
Referenced by oxr_session_frame_wait().
| struct os_mutex oxr_session::sync_actions_mutex |
Protects access to dynamic_roles_generation_id during sync actions.
Referenced by oxr_action_sync_data().
| struct xrt_compositor_native* oxr_session::xcn |
Native compositor that is wrapped by client compositors.
| struct xrt_session* oxr_session::xs |
The xrt_session backing this session.