Monado OpenXR Runtime
|
Gets called from OpenXR entrypoints functions and talks to devices and Compositor using XRT interfaces. More...
Modules | |
OpenXR input | |
The action-set/action-based input subsystem of OpenXR. | |
Files | |
file | oxr_binding.c |
Holds binding related functions. | |
file | oxr_body_tracking.c |
body tracking related API entrypoint functions. | |
file | oxr_conversions.h |
Smaller helper functions to convert between xrt and OpenXR things. | |
file | oxr_d3d.cpp |
D3D 11 and 12 shared routines. | |
file | oxr_d3d11.cpp |
Holds D3D11 related functions that didn't fit somewhere else. | |
file | oxr_d3d12.cpp |
Holds D3D12 related functions that didn't fit somewhere else. | |
file | oxr_defines.h |
Shared internal defines and enums in the state tracker. | |
file | oxr_dpad.c |
Holds binding related functions. | |
file | oxr_event.c |
Holds event related functions. | |
file | oxr_face_tracking.c |
face tracking related API entrypoint functions. | |
file | oxr_face_tracking2_fb.c |
face tracking related API entrypoint functions. | |
file | oxr_frame_sync.c |
The objects that handle session running status and blocking of xrWaitFrame. | |
file | oxr_frame_sync.h |
The objects that handle session running status and blocking of xrWaitFrame. | |
file | oxr_handle.h |
Contains handle-related functions and defines only required in a few locations. | |
file | oxr_input.c |
Holds input related functions. | |
file | oxr_instance.c |
Holds instance related functions. | |
file | oxr_logger.c |
Logging functions. | |
file | oxr_logger.h |
Logging functions. | |
file | oxr_messenger.c |
Holds debug utils/messenger related functions. | |
file | oxr_objects.h |
The objects representing OpenXR handles, and prototypes for internal functions used in the state tracker. | |
file | oxr_passthrough.c |
passthrough related API entrypoint functions. | |
file | oxr_path.c |
Holds path related functions. | |
file | oxr_pretty_print.c |
Pretty printing functions. | |
file | oxr_pretty_print.h |
Pretty printing functions. | |
file | oxr_session.c |
Holds session related functions. | |
file | oxr_session_frame_end.c |
Holds session end frame functions. | |
file | oxr_session_gfx_d3d11.c |
Holds D3D11 specific session functions. | |
file | oxr_session_gfx_d3d12.c |
Holds D3D12 specific session functions. | |
file | oxr_session_gfx_egl.c |
Holds OpenGL-specific session functions. | |
file | oxr_session_gfx_gl_win32.c |
Holds OpenGL-specific session functions for Windows. | |
file | oxr_session_gfx_gl_xlib.c |
Holds OpenGL-specific session functions. | |
file | oxr_session_gfx_gles_android.c |
Holds OpenGLES-specific session functions. | |
file | oxr_session_gfx_vk.c |
Holds Vulkan specific session functions. | |
file | oxr_space.c |
So much space! | |
file | oxr_swapchain.c |
Holds swapchain related functions. | |
file | oxr_swapchain_common.h |
Helper functions for oxr_swapchain functions. | |
file | oxr_swapchain_d3d11.c |
Holds D3D11 swapchain related functions. | |
file | oxr_swapchain_d3d12.c |
Holds D3D12 swapchain related functions. | |
file | oxr_swapchain_gl.c |
Holds OpenGL swapchain related functions. | |
file | oxr_swapchain_vk.c |
Holds Vulkan swapchain related functions. | |
file | oxr_system.c |
Holds system related entrypoints. | |
file | oxr_two_call.h |
Two call helper functions. | |
file | oxr_verify.c |
File for verifying app input into api functions. | |
file | oxr_vulkan.c |
Holds Vulkan related functions. | |
file | oxr_xdev.c |
Various helpers for accessing xrt_device. | |
file | oxr_xret.h |
File holding helper for xrt_result_t results. | |
Data Structures | |
struct | oxr_logger |
Logger struct that lives on the stack, one for each call client call. More... | |
struct | oxr_sink_logger |
Allocate on the stack, make sure to zero initialize. More... | |
struct | oxr_handle_base |
Used to hold diverse child handles and ensure orderly destruction. More... | |
struct | oxr_system |
Single or multiple devices grouped together to form a system that sessions can be created from. More... | |
struct | oxr_extension_status |
Structure tracking which extensions are enabled for a given instance. More... | |
struct | oxr_instance |
Main object that ties everything together. More... | |
struct | oxr_session |
Object that client program interact with. More... | |
struct | oxr_dpad_settings |
dpad settings we need extracted from XrInteractionProfileDpadBindingEXT More... | |
struct | oxr_dpad_binding_modification |
dpad binding extracted from XrInteractionProfileDpadBindingEXT More... | |
struct | oxr_dpad_entry |
A entry in the dpad state for one action set. More... | |
struct | oxr_dpad_state |
Holds dpad binding state for a single interaction profile. More... | |
struct | oxr_dpad_emulation |
dpad emulation settings from oxr_interaction_profile More... | |
struct | oxr_interaction_profile |
A single interaction profile. More... | |
struct | oxr_binding |
Interaction profile binding state. More... | |
struct | oxr_subaction_paths |
A parsed equivalent of a list of sub-action paths. More... | |
struct | oxr_action_set_attachment |
The data associated with the attachment of an Action Set (oxr_action_set) to as Session (oxr_session). More... | |
struct | oxr_action_state |
The state of a action input. More... | |
struct | oxr_action_input |
A input action pair of a xrt_input and a xrt_device, along with the required transform. More... | |
struct | oxr_action_output |
A output action pair of a xrt_output_name and a xrt_device. More... | |
struct | oxr_action_cache |
The set of inputs/outputs for a single sub-action path for an action. More... | |
struct | oxr_action_attachment |
Data associated with an Action that has been attached to a Session. More... | |
struct | oxr_space |
Can be one of several reference space types, or a space that is bound to an action. More... | |
struct | oxr_swapchain |
A set of images used for rendering. More... | |
struct | oxr_refcounted |
struct | oxr_action_set_ref |
The reference-counted data of an action set. More... | |
struct | oxr_action_set |
A group of actions. More... | |
struct | oxr_action_ref |
The reference-counted data of an action. More... | |
struct | oxr_action |
A single action. More... | |
struct | oxr_debug_messenger |
Debug object created by the client program. More... | |
struct | oxr_hand_tracker |
A hand tracker. More... | |
struct | oxr_path |
Internal representation of a path, item follows this struct in memory and that in turn is followed by the string. More... | |
Macros | |
#define | OXR_WARN_ONCE(log, ...) |
Helper macro to log a warning just once. More... | |
#define | XRT_MAX_HANDLE_CHILDREN 256 |
#define | OXR_MAX_BINDINGS_PER_ACTION 32 |
#define | OXR_XRT_POSE_TO_XRPOSEF(FROM, TO) |
Safely copy an xrt_pose to an XrPosef. More... | |
#define | OXR_XRT_FOV_TO_XRFOVF(FROM, TO) |
Safely copy an xrt_fov to an XrFovf. More... | |
#define | OXR_CHECK_XRET(LOG, SESS, RESULTS, FUNCTION) |
Helper define to check results from 'xrt_` functions (xrt_result_t) and also set any needed state. More... | |
Typedefs | |
typedef XrResult(* | oxr_handle_destroyer) (struct oxr_logger *log, struct oxr_handle_base *hb) |
Function pointer type for a handle destruction function. More... | |
Enumerations | |
enum | oxr_handle_state { OXR_HANDLE_STATE_UNINITIALIZED = 0 , OXR_HANDLE_STATE_LIVE , OXR_HANDLE_STATE_DESTROYED } |
State of a handle base, to reduce likelihood of going "boom" on out-of-order destruction or other unsavory behavior. More... | |
enum | oxr_subaction_path { OXR_SUB_ACTION_PATH_USER , OXR_SUB_ACTION_PATH_HEAD , OXR_SUB_ACTION_PATH_LEFT , OXR_SUB_ACTION_PATH_RIGHT , OXR_SUB_ACTION_PATH_GAMEPAD , OXR_SUB_ACTION_PATH_EYES } |
Sub action paths. More... | |
enum | oxr_dpad_region { OXR_DPAD_REGION_CENTER = 0u , OXR_DPAD_REGION_UP = (1u << 0u) , OXR_DPAD_REGION_DOWN = (1u << 1u) , OXR_DPAD_REGION_LEFT = (1u << 2u) , OXR_DPAD_REGION_RIGHT = (1u << 3u) } |
Region of a dpad binding that an input is mapped to. More... | |
enum | oxr_image_state { OXR_IMAGE_STATE_READY , OXR_IMAGE_STATE_ACQUIRED , OXR_IMAGE_STATE_WAITED } |
Tracks the state of a image that belongs to a oxr_swapchain. More... | |
enum | oxr_space_type { OXR_SPACE_TYPE_REFERENCE_VIEW , OXR_SPACE_TYPE_REFERENCE_LOCAL , OXR_SPACE_TYPE_REFERENCE_LOCAL_FLOOR , OXR_SPACE_TYPE_REFERENCE_STAGE , OXR_SPACE_TYPE_REFERENCE_UNBOUNDED_MSFT , OXR_SPACE_TYPE_REFERENCE_COMBINED_EYE_VARJO , OXR_SPACE_TYPE_REFERENCE_LOCALIZATION_MAP_ML , OXR_SPACE_TYPE_ACTION , OXR_SPACE_TYPE_XDEV_POSE } |
Internal enum for the type of space, lets us reason about action spaces. More... | |
enum | oxr_session_graphics_ext { OXR_SESSION_GRAPHICS_EXT_HEADLESS , OXR_SESSION_GRAPHICS_EXT_VULKAN , OXR_SESSION_GRAPHICS_EXT_D3D11 , OXR_SESSION_GRAPHICS_EXT_D3D12 , OXR_SESSION_GRAPHICS_EXT_WIN32_GL , OXR_SESSION_GRAPHICS_EXT_XLIB_GL , OXR_SESSION_GRAPHICS_EXT_ANDROID_GLES , OXR_SESSION_GRAPHICS_EXT_EGL } |
What graphics API was this session created with. More... | |
Functions | |
void | oxr_log_init (struct oxr_logger *logger, const char *api_func_name) |
void | oxr_log_set_instance (struct oxr_logger *logger, struct oxr_instance *inst) |
void | oxr_log (struct oxr_logger *logger, const char *fmt,...) XRT_PRINTF_FORMAT(2 |
void void | oxr_warn (struct oxr_logger *logger, const char *fmt,...) XRT_PRINTF_FORMAT(2 |
void void XrResult | oxr_error (struct oxr_logger *logger, XrResult result, const char *fmt,...) XRT_PRINTF_FORMAT(3 |
Output an error and return the result code. More... | |
void | oxr_slog (struct oxr_sink_logger *slog, const char *fmt,...) XRT_PRINTF_FORMAT(2 |
Log string to sink logger. More... | |
void void | oxr_slog_add_array (struct oxr_sink_logger *slog, const char *str, size_t size) |
Add the string to the slog struct. More... | |
static u_pp_delegate_t | oxr_slog_dg (struct oxr_sink_logger *slog) |
Get a pretty print delegate from a oxr_sink_logger. More... | |
void | oxr_slog_cancel (struct oxr_sink_logger *slog) |
Cancel logging, frees all internal data. More... | |
void | oxr_log_slog (struct oxr_logger *log, struct oxr_sink_logger *slog) |
Flush sink as a log message, frees all internal data. More... | |
void | oxr_warn_slog (struct oxr_logger *log, struct oxr_sink_logger *slog) |
Flush sink as a warning message, frees all internal data. More... | |
XrResult | oxr_error_slog (struct oxr_logger *log, XrResult res, struct oxr_sink_logger *slog) |
Flush sink as a error message, frees all internal data. More... | |
static bool | oxr_space_type_is_reference (enum oxr_space_type space_type) |
static void | oxr_refcounted_ref (struct oxr_refcounted *orc) |
Increase the reference count of orc . More... | |
static void | oxr_refcounted_unref (struct oxr_refcounted *orc) |
Decrease the reference count of orc , destroying it if it reaches 0. More... | |
void | oxr_pp_fov_indented_as_object (struct oxr_sink_logger *slog, const struct xrt_fov *fov, const char *name) |
Prints a fov to a oxr_sink_logger, on the form of \n\t${name}->fov ... . More... | |
void | oxr_pp_pose_indented_as_object (struct oxr_sink_logger *slog, const struct xrt_pose *pose, const char *name) |
Prints a pose to a oxr_sink_logger, on the form of \n\t${name}->pose ... . More... | |
void | oxr_pp_space_indented (struct oxr_sink_logger *slog, const struct oxr_space *spc, const char *name) |
Prints a space to a oxr_sink_logger, on the form of \n\t${name}-><field> ... . More... | |
void | oxr_pp_relation_indented (struct oxr_sink_logger *slog, const struct xrt_space_relation *relation, const char *name) |
Prints a space to a oxr_sink_logger, on the form of \n\t${name}-><field> ... . More... | |
XrResult | oxr_handle_base::oxr_handle_destroy (struct oxr_logger *log, struct oxr_handle_base *hb) |
Destroy the handle's object, as well as all child handles recursively. More... | |
const char * | oxr_handle_state_to_string (enum oxr_handle_state state) |
Returns a human-readable label for a handle state. More... | |
static XrActionSet | oxr_action_set_to_openxr (struct oxr_action_set *act_set) |
To go back to a OpenXR object. More... | |
static XrHandTrackerEXT | oxr_hand_tracker_to_openxr (struct oxr_hand_tracker *hand_tracker) |
To go back to a OpenXR object. More... | |
static XrAction | oxr_action_to_openxr (struct oxr_action *act) |
To go back to a OpenXR object. More... | |
oxr_input.c | |
XrResult | oxr_session_update_action_bindings (struct oxr_logger *log, struct oxr_session *sess) |
bool | oxr_instance::oxr_classify_subaction_paths (struct oxr_logger *log, const struct oxr_instance *inst, uint32_t subaction_path_count, const XrPath *subaction_paths, struct oxr_subaction_paths *subaction_paths_out) |
Helper function to classify subaction_paths. More... | |
XrResult | oxr_session::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. More... | |
XrResult | oxr_instance::oxr_action_set_create (struct oxr_logger *log, struct oxr_instance *inst, const XrActionSetCreateInfo *createInfo, struct oxr_action_set **out_act_set) |
XrResult | oxr_action::oxr_action_create (struct oxr_logger *log, struct oxr_action_set *act_set, const XrActionCreateInfo *createInfo, struct oxr_action **out_act) |
XrResult | oxr_session::oxr_session_attach_action_sets (struct oxr_logger *log, struct oxr_session *sess, const XrSessionActionSetsAttachInfo *bindInfo) |
XrResult | oxr_session::oxr_action_sync_data (struct oxr_logger *log, struct oxr_session *sess, uint32_t countActionSets, const XrActiveActionSet *actionSets) |
XrResult | oxr_session::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_session::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_session::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_session::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_session::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_session::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_session::oxr_action_stop_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths) |
XrResult | oxr_instance::oxr_hand_tracker_create (struct oxr_logger *log, struct oxr_session *sess, const XrHandTrackerCreateInfoEXT *createInfo, struct oxr_hand_tracker **out_hand_tracker) |
oxr_binding.c | |
void | oxr_get_profile_for_device_name (struct oxr_logger *log, struct oxr_session *sess, enum xrt_device_name name, struct oxr_interaction_profile **out_p) |
struct oxr_interaction_profile * | oxr_clone_profile (const struct oxr_interaction_profile *src_profile) |
void | oxr_session::oxr_find_profile_for_device (struct oxr_logger *log, struct oxr_session *sess, struct xrt_device *xdev, struct oxr_interaction_profile **out_p) |
Find the best matching profile for the given xrt_device. More... | |
void | oxr_instance::oxr_binding_destroy_all (struct oxr_logger *log, struct oxr_instance *inst) |
Free all memory allocated by the binding system. More... | |
void | oxr_instance::oxr_session_binding_destroy_all (struct oxr_logger *log, struct oxr_session *sess) |
Free all memory allocated by the binding system. More... | |
void | oxr_interaction_profile::oxr_binding_find_bindings_from_key (struct oxr_logger *log, struct oxr_interaction_profile *p, uint32_t key, size_t max_bounding_count, struct oxr_binding **bindings, size_t *out_binding_count) |
Find all bindings that is the given action key is bound to. More... | |
XrResult | oxr_instance::oxr_action_suggest_interaction_profile_bindings (struct oxr_logger *log, struct oxr_instance *inst, const XrInteractionProfileSuggestedBinding *suggestedBindings, struct oxr_dpad_state *state) |
XrResult | oxr_instance::oxr_action_get_current_interaction_profile (struct oxr_logger *log, struct oxr_session *sess, XrPath topLevelUserPath, XrInteractionProfileState *interactionProfile) |
XrResult | oxr_session::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) |
oxr_session.c | |
XrResult | oxr_session_create (struct oxr_logger *log, struct oxr_system *sys, const XrSessionCreateInfo *createInfo, struct oxr_session **out_session) |
XrResult | oxr_session_enumerate_formats (struct oxr_logger *log, struct oxr_session *sess, uint32_t formatCapacityInput, uint32_t *formatCountOutput, int64_t *formats) |
void | oxr_session_change_state (struct oxr_logger *log, struct oxr_session *sess, XrSessionState state, XrTime time) |
Change the state of the session, queues a event. More... | |
XrResult | oxr_session_begin (struct oxr_logger *log, struct oxr_session *sess, const XrSessionBeginInfo *beginInfo) |
XrResult | oxr_session_end (struct oxr_logger *log, struct oxr_session *sess) |
XrResult | oxr_session_request_exit (struct oxr_logger *log, struct oxr_session *sess) |
XRT_CHECK_RESULT XrResult | oxr_session_poll (struct oxr_logger *log, struct oxr_session *sess) |
XrResult | oxr_session_locate_views (struct oxr_logger *log, struct oxr_session *sess, const XrViewLocateInfo *viewLocateInfo, XrViewState *viewState, uint32_t viewCapacityInput, uint32_t *viewCountOutput, XrView *views) |
XrResult | oxr_session_frame_wait (struct oxr_logger *log, struct oxr_session *sess, XrFrameState *frameState) |
XrResult | oxr_session_frame_begin (struct oxr_logger *log, struct oxr_session *sess) |
XrResult | oxr_session_frame_end (struct oxr_logger *log, struct oxr_session *sess, const XrFrameEndInfo *frameEndInfo) |
XrResult | oxr_session_hand_joints (struct oxr_logger *log, struct oxr_hand_tracker *hand_tracker, const XrHandJointsLocateInfoEXT *locateInfo, XrHandJointLocationsEXT *locations) |
XrResult | oxr_get_base_body_pose (struct oxr_logger *log, const struct xrt_body_joint_set *body_joint_set, struct oxr_space *base_spc, struct xrt_device *body_xdev, XrTime at_time, struct xrt_space_relation *out_base_body) |
XrResult | oxr_session_apply_force_feedback (struct oxr_logger *log, struct oxr_hand_tracker *hand_tracker, const XrForceFeedbackCurlApplyLocationsMNDX *locations) |
static XrSpace | oxr_space_to_openxr (struct oxr_space *spc) |
To go back to a OpenXR object. More... | |
XrResult | oxr_space_action_create (struct oxr_logger *log, struct oxr_session *sess, uint32_t key, const XrActionSpaceCreateInfo *createInfo, struct oxr_space **out_space) |
XrResult | oxr_space_get_reference_bounds_rect (struct oxr_logger *log, struct oxr_session *sess, XrReferenceSpaceType referenceSpaceType, XrExtent2Df *bounds) |
XrResult | oxr_space_reference_create (struct oxr_logger *log, struct oxr_session *sess, const XrReferenceSpaceCreateInfo *createInfo, struct oxr_space **out_space) |
XrResult | oxr_space_xdev_pose_create (struct oxr_logger *log, struct oxr_session *sess, struct xrt_device *xdev, enum xrt_input_name name, const struct xrt_pose *pose, struct oxr_space **out_space) |
Monado special space that always points to a specific xrt_device and pose, useful when you want to bypass the action binding system for instance. More... | |
XrResult | oxr_space_locate (struct oxr_logger *log, struct oxr_space *spc, struct oxr_space *baseSpc, XrTime time, XrSpaceLocation *location) |
XrResult | oxr_spaces_locate (struct oxr_logger *log, struct oxr_space **spcs, uint32_t spc_count, struct oxr_space *baseSpc, XrTime time, XrSpaceLocations *locations) |
XRT_CHECK_RESULT XrResult | oxr_space_locate_device (struct oxr_logger *log, struct xrt_device *xdev, struct oxr_space *baseSpc, XrTime time, struct xrt_space_relation *out_relation) |
Locate the xrt_device in the given base space, useful for implementing hand tracking location look ups and the like. More... | |
static XrSwapchain | oxr_swapchain_to_openxr (struct oxr_swapchain *sc) |
To go back to a OpenXR object. More... | |
static XrDebugUtilsMessengerEXT | oxr_messenger_to_openxr (struct oxr_debug_messenger *mssngr) |
To go back to a OpenXR object. More... | |
XrResult | oxr_create_messenger (struct oxr_logger *, struct oxr_instance *inst, const XrDebugUtilsMessengerCreateInfoEXT *, struct oxr_debug_messenger **out_mssngr) |
XrResult | oxr_destroy_messenger (struct oxr_logger *log, struct oxr_debug_messenger *mssngr) |
XrResult | oxr_system_select (struct oxr_logger *log, struct oxr_system **systems, uint32_t system_count, XrFormFactor form_factor, struct oxr_system **out_selected) |
XrResult | oxr_system_fill_in (struct oxr_logger *log, struct oxr_instance *inst, XrSystemId systemId, uint32_t view_count, struct oxr_system *sys) |
XrResult | oxr_system_verify_id (struct oxr_logger *log, const struct oxr_instance *inst, XrSystemId systemId) |
XrResult | oxr_system_get_by_id (struct oxr_logger *log, struct oxr_instance *inst, XrSystemId systemId, struct oxr_system **system) |
XrResult | oxr_system_get_properties (struct oxr_logger *log, struct oxr_system *sys, XrSystemProperties *properties) |
XrResult | oxr_system_enumerate_view_confs (struct oxr_logger *log, struct oxr_system *sys, uint32_t viewConfigurationTypeCapacityInput, uint32_t *viewConfigurationTypeCountOutput, XrViewConfigurationType *viewConfigurationTypes) |
XrResult | oxr_system_enumerate_blend_modes (struct oxr_logger *log, struct oxr_system *sys, XrViewConfigurationType viewConfigurationType, uint32_t environmentBlendModeCapacityInput, uint32_t *environmentBlendModeCountOutput, XrEnvironmentBlendMode *environmentBlendModes) |
XrResult | oxr_system_get_view_conf_properties (struct oxr_logger *log, struct oxr_system *sys, XrViewConfigurationType viewConfigurationType, XrViewConfigurationProperties *configurationProperties) |
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) |
bool | oxr_system_get_hand_tracking_support (struct oxr_logger *log, struct oxr_instance *inst) |
bool | oxr_system_get_eye_gaze_support (struct oxr_logger *log, struct oxr_instance *inst) |
bool | oxr_system_get_force_feedback_support (struct oxr_logger *log, struct oxr_instance *inst) |
void | oxr_system_get_face_tracking_htc_support (struct oxr_logger *log, struct oxr_instance *inst, bool *supports_eye, bool *supports_lip) |
void | oxr_system_get_face_tracking2_fb_support (struct oxr_logger *log, struct oxr_instance *inst, bool *supports_audio, bool *supports_visual) |
bool | oxr_system_get_body_tracking_fb_support (struct oxr_logger *log, struct oxr_instance *inst) |
XrResult | oxr_event_push_XrEventDataSessionStateChanged (struct oxr_logger *log, struct oxr_session *sess, XrSessionState state, XrTime time) |
XrResult | oxr_event_push_XrEventDataInteractionProfileChanged (struct oxr_logger *log, struct oxr_session *sess) |
XrResult | oxr_event_push_XrEventDataReferenceSpaceChangePending (struct oxr_logger *log, struct oxr_session *sess, XrReferenceSpaceType referenceSpaceType, XrTime changeTime, XrBool32 poseValid, const XrPosef *poseInPreviousSpace) |
XrResult | oxr_event_remove_session_events (struct oxr_logger *log, struct oxr_session *sess) |
This clears all pending events refers to the given session. More... | |
XrResult | oxr_poll_event (struct oxr_logger *log, struct oxr_instance *inst, XrEventDataBuffer *eventData) |
Will return one event if available, also drain the sessions event queues. More... | |
void | oxr_xdev_destroy (struct xrt_device **xdev_ptr) |
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. More... | |
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. More... | |
void | oxr_xdev_get_hand_tracking_at (struct oxr_logger *log, struct oxr_instance *inst, struct xrt_device *xdev, enum xrt_input_name name, XrTime at_time, struct xrt_hand_joint_set *out_value) |
Returns the hand tracking value of the named input from the device. More... | |
XrResult | oxr_session_populate_gl_xlib (struct oxr_logger *log, struct oxr_system *sys, XrGraphicsBindingOpenGLXlibKHR const *next, struct oxr_session *sess) |
XrResult | oxr_swapchain_gl_create (struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **out_swapchain) |
XrResult | oxr_vk_get_instance_exts (struct oxr_logger *log, struct oxr_system *sys, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString) |
XrResult | oxr_vk_get_device_exts (struct oxr_logger *log, struct oxr_system *sys, uint32_t namesCapacityInput, uint32_t *namesCountOutput, char *namesString) |
XrResult | oxr_vk_get_requirements (struct oxr_logger *log, struct oxr_system *sys, XrGraphicsRequirementsVulkanKHR *graphicsRequirements) |
XrResult | oxr_vk_create_vulkan_instance (struct oxr_logger *log, struct oxr_system *sys, const XrVulkanInstanceCreateInfoKHR *createInfo, VkInstance *vulkanInstance, VkResult *vulkanResult) |
XrResult | oxr_vk_create_vulkan_device (struct oxr_logger *log, struct oxr_system *sys, const XrVulkanDeviceCreateInfoKHR *createInfo, VkDevice *vulkanDevice, VkResult *vulkanResult) |
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) |
XrResult | oxr_session_populate_vk (struct oxr_logger *log, struct oxr_system *sys, XrGraphicsBindingVulkanKHR const *next, struct oxr_session *sess) |
XrResult | oxr_swapchain_vk_create (struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **out_swapchain) |
XrResult | oxr_d3d_get_requirements (struct oxr_logger *log, struct oxr_system *sys, LUID *adapter_luid, D3D_FEATURE_LEVEL *min_feature_level) |
Common GetRequirements call for D3D11 and D3D12. More... | |
XrResult | oxr_d3d_check_luid (struct oxr_logger *log, struct oxr_system *sys, LUID *adapter_luid) |
Verify the provided LUID matches the expected one in sys . More... | |
static struct xrt_device * | get_role_head (struct oxr_system *sys) |
static struct xrt_device * | get_role_eyes (struct oxr_system *sys) |
static struct xrt_device * | get_role_face (struct oxr_system *sys) |
static struct xrt_device * | get_role_body (struct oxr_system *sys) |
static struct xrt_device * | get_role_hand_tracking_left (struct oxr_system *sys) |
static struct xrt_device * | get_role_hand_tracking_right (struct oxr_system *sys) |
static struct xrt_device * | get_role_left (struct oxr_system *sys) |
static struct xrt_device * | get_role_right (struct oxr_system *sys) |
static struct xrt_device * | get_role_gamepad (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_head (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_eyes (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_face (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_body (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_hand_tracking_left (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_hand_tracking_right (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_left (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_right (struct oxr_system *sys) |
static enum xrt_device_name | get_role_profile_gamepad (struct oxr_system *sys) |
static XrSession | oxr_session_to_openxr (struct oxr_session *sess) |
To go back to a OpenXR object. More... | |
static XrResult | oxr_session::oxr_session_success_result (struct oxr_session *session) |
Returns XR_SUCCESS or XR_SESSION_LOSS_PENDING as appropriate. More... | |
static XrResult | oxr_session::oxr_session_success_focused_result (struct oxr_session *session) |
Returns XR_SUCCESS, XR_SESSION_LOSS_PENDING, or XR_SESSION_NOT_FOCUSED, as appropriate. More... | |
static bool | oxr_subaction_paths::oxr_subaction_paths_is_subset_of (const struct oxr_subaction_paths *a, const struct oxr_subaction_paths *b) |
Helper function to determine if the set of paths in a is a subset of the paths in b . More... | |
void | oxr_action_set_attachment::oxr_action_set_attachment_teardown (struct oxr_action_set_attachment *act_set_attached) |
De-initialize an action set attachment and its action attachments. More... | |
#define | MAKE_GET_DYN_ROLES_FN(ROLE) |
#define | GET_XDEV_BY_ROLE(SYS, ROLE) (get_role_##ROLE((SYS))) |
#define | MAKE_GET_DYN_ROLE_PROFILE_FN(ROLE) |
#define | GET_PROFILE_NAME_BY_ROLE(SYS, ROLE) (get_role_profile_##ROLE((SYS))) |
#define | MAKE_EXT_STATUS(mixed_case, all_caps) bool mixed_case; |
oxr_instance.c | |
static XrInstance | oxr_instance_to_openxr (struct oxr_instance *inst) |
To go back to a OpenXR object. More... | |
XrResult | oxr_instance::oxr_instance_create (struct oxr_logger *log, const XrInstanceCreateInfo *createInfo, XrVersion major_minor, const struct oxr_extension_status *extensions, struct oxr_instance **out_inst) |
Creates a instance, does minimal validation of createInfo . More... | |
XrResult | oxr_instance::oxr_instance_get_properties (struct oxr_logger *log, struct oxr_instance *inst, XrInstanceProperties *instanceProperties) |
XrResult | oxr_instance::oxr_instance_convert_time_to_timespec (struct oxr_logger *log, struct oxr_instance *inst, XrTime time, struct timespec *timespecTime) |
XrResult | oxr_instance::oxr_instance_convert_timespec_to_time (struct oxr_logger *log, struct oxr_instance *inst, const struct timespec *timespecTime, XrTime *time) |
oxr_path.c | |
bool | oxr_instance::oxr_path_is_valid (struct oxr_logger *log, struct oxr_instance *inst, XrPath path) |
void * | oxr_instance::oxr_path_get_attached (struct oxr_logger *log, struct oxr_instance *inst, XrPath path) |
XrResult | oxr_instance::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. More... | |
XrResult | oxr_instance::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. More... | |
XrResult | oxr_instance::oxr_path_get_string (struct oxr_logger *log, const struct oxr_instance *inst, XrPath path, const char **out_str, size_t *out_length) |
Get a pointer and length of the internal string. More... | |
Gets called from OpenXR entrypoints functions and talks to devices and Compositor using XRT interfaces.
#define MAKE_GET_DYN_ROLE_PROFILE_FN | ( | ROLE | ) |
#include <state_trackers/oxr/oxr_objects.h>
#define MAKE_GET_DYN_ROLES_FN | ( | ROLE | ) |
#include <state_trackers/oxr/oxr_objects.h>
#define OXR_CHECK_XRET | ( | LOG, | |
SESS, | |||
RESULTS, | |||
FUNCTION | |||
) |
#include <state_trackers/oxr/oxr_xret.h>
Helper define to check results from 'xrt_` functions (xrt_result_t) and also set any needed state.
#define OXR_WARN_ONCE | ( | log, | |
... | |||
) |
#include <state_trackers/oxr/oxr_logger.h>
Helper macro to log a warning just once.
#define OXR_XRT_FOV_TO_XRFOVF | ( | FROM, | |
TO | |||
) |
#include <state_trackers/oxr/oxr_objects.h>
Safely copy an xrt_fov to an XrFovf.
#define OXR_XRT_POSE_TO_XRPOSEF | ( | FROM, | |
TO | |||
) |
#include <state_trackers/oxr/oxr_objects.h>
Safely copy an xrt_pose to an XrPosef.
|
related |
Function pointer type for a handle destruction function.
enum oxr_dpad_region |
#include <state_trackers/oxr/oxr_defines.h>
Region of a dpad binding that an input is mapped to.
enum oxr_handle_state |
#include <state_trackers/oxr/oxr_defines.h>
State of a handle base, to reduce likelihood of going "boom" on out-of-order destruction or other unsavory behavior.
enum oxr_image_state |
#include <state_trackers/oxr/oxr_defines.h>
Tracks the state of a image that belongs to a oxr_swapchain.
#include <state_trackers/oxr/oxr_defines.h>
What graphics API was this session created with.
enum oxr_space_type |
#include <state_trackers/oxr/oxr_defines.h>
Internal enum for the type of space, lets us reason about action spaces.
enum oxr_subaction_path |
#include <state_trackers/oxr/oxr_defines.h>
Sub action paths.
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.
void oxr_action_set_attachment_teardown | ( | struct oxr_action_set_attachment * | act_set_attached | ) |
De-initialize an action set attachment and its action attachments.
Frees the action attachments, but does not de-allocate the action set attachment.
References oxr_action_set_attachment::act_attachments, oxr_action_set_attachment::action_attachment_count, oxr_action_attachment::oxr_action_attachment_teardown(), and oxr_action_set_attachment::sess.
|
related |
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
|
related |
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
void oxr_binding_destroy_all | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst | ||
) |
Free all memory allocated by the binding system.
void oxr_binding_find_bindings_from_key | ( | struct oxr_logger * | log, |
struct oxr_interaction_profile * | p, | ||
uint32_t | key, | ||
size_t | max_bounding_count, | ||
struct oxr_binding ** | bindings, | ||
size_t * | out_binding_count | ||
) |
Find all bindings that is the given action key is bound to.
bool oxr_classify_subaction_paths | ( | struct oxr_logger * | log, |
const struct oxr_instance * | inst, | ||
uint32_t | subaction_path_count, | ||
const XrPath * | subaction_paths, | ||
struct oxr_subaction_paths * | subaction_paths_out | ||
) |
Helper function to classify subaction_paths.
Sets all members of subaction_paths
( oxr_subaction_paths ) as appropriate based on the subaction paths found in the list.
If no paths are provided, subaction_paths->any
will be true.
References OXR_FOR_EACH_VALID_SUBACTION_PATH, oxr_action_ref::subaction_paths, and U_ZERO.
Referenced by oxr_verify_subaction_path_sync().
XrResult oxr_create_messenger | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
const XrDebugUtilsMessengerCreateInfoEXT * | createInfo, | ||
struct oxr_debug_messenger ** | out_mssngr | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
XrResult oxr_d3d_check_luid | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
LUID * | adapter_luid | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Verify the provided LUID matches the expected one in sys
.
References oxr_error(), and oxr_system::xsysc.
XrResult oxr_d3d_get_requirements | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
LUID * | adapter_luid, | ||
D3D_FEATURE_LEVEL * | min_feature_level | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Common GetRequirements call for D3D11 and D3D12.
References xrt_system_compositor_info::client_d3d_deviceLUID, xrt_system_compositor_info::client_d3d_deviceLUID_valid, xrt::auxiliary::d3d::getAdapterByIndex(), xrt::auxiliary::d3d::getAdapterByLUID(), xrt_system_compositor::info, oxr_error(), U_LOGGING_INFO, and oxr_system::xsysc.
void void XrResult oxr_error | ( | struct oxr_logger * | logger, |
XrResult | result, | ||
const char * | fmt, | ||
... | |||
) |
#include <state_trackers/oxr/oxr_logger.h>
Output an error and return the result code.
Intended for use in a return statement, to log error information and return the result code in a single line.
Note: The format string is appended to the function name with no spaces, so it should either start with a parenthesized argument name followed by a space and the message, or should start with a space then the message. That is, a format string of "(arg) info"
becomes XR_ERROR: xrFunc(arg) info
, and a format string of " info msg"
becomes XR_ERROR: xrFunc info msg
.
XrResult oxr_error_slog | ( | struct oxr_logger * | log, |
XrResult | res, | ||
struct oxr_sink_logger * | slog | ||
) |
#include <state_trackers/oxr/oxr_logger.h>
Flush sink as a error message, frees all internal data.
References oxr_error().
XrResult oxr_event_remove_session_events | ( | struct oxr_logger * | log, |
struct oxr_session * | sess | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
This clears all pending events refers to the given session.
References oxr_session::oxr_session_to_openxr().
void oxr_find_profile_for_device | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
struct xrt_device * | xdev, | ||
struct oxr_interaction_profile ** | out_p | ||
) |
Find the best matching profile for the given xrt_device.
log | Logger. | |
sess | Session. | |
xdev | Can be null. | |
[out] | out_p | Returned interaction profile. |
|
related |
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
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.
This should be how all handle-associated objects are destroyed.
|
related |
Returns a human-readable label for a handle state.
References OXR_HANDLE_STATE_DESTROYED, OXR_HANDLE_STATE_LIVE, and OXR_HANDLE_STATE_UNINITIALIZED.
|
static |
Creates a instance, does minimal validation of createInfo
.
[in] | log | Logger |
[in] | createInfo | OpenXR creation info. |
[in] | extensions | Parsed extension list to be enabled. |
[out] | out_inst | Pointer to pointer to a instance, returned instance. |
References oxr_handle_base::OXR_ALLOCATE_HANDLE_OR_RETURN.
|
related |
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
void oxr_log_slog | ( | struct oxr_logger * | log, |
struct oxr_sink_logger * | slog | ||
) |
#include <state_trackers/oxr/oxr_logger.h>
Flush sink as a log message, frees all internal data.
|
inlinestatic |
#include <state_trackers/oxr/oxr_objects.h>
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
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.
XrResult oxr_path_get_string | ( | struct oxr_logger * | log, |
const struct oxr_instance * | inst, | ||
XrPath | path, | ||
const char ** | out_str, | ||
size_t * | out_length | ||
) |
Get a pointer and length of the internal string.
The pointer has the same life time as the instance. The length is the number of valid characters, not including the null termination character (but an extra null byte is always reserved at the end so can strings can be given to functions expecting null terminated strings).
Referenced by oxr_verify_subaction_path_sync().
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.
XrResult oxr_poll_event | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrEventDataBuffer * | eventData | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Will return one event if available, also drain the sessions event queues.
void oxr_pp_fov_indented_as_object | ( | struct oxr_sink_logger * | slog, |
const struct xrt_fov * | fov, | ||
const char * | name | ||
) |
#include <state_trackers/oxr/oxr_pretty_print.h>
Prints a fov to a oxr_sink_logger, on the form of \n\t${name}->fov ...
.
Note no trailing line break and but a starting line break, see Pretty printing functions and helpers.
References oxr_slog().
void oxr_pp_pose_indented_as_object | ( | struct oxr_sink_logger * | slog, |
const struct xrt_pose * | pose, | ||
const char * | name | ||
) |
#include <state_trackers/oxr/oxr_pretty_print.h>
Prints a pose to a oxr_sink_logger, on the form of \n\t${name}->pose ...
.
Note no trailing line break and but a starting line break, see Pretty printing functions and helpers.
void oxr_pp_relation_indented | ( | struct oxr_sink_logger * | slog, |
const struct xrt_space_relation * | relation, | ||
const char * | name | ||
) |
#include <state_trackers/oxr/oxr_pretty_print.h>
Prints a space to a oxr_sink_logger, on the form of \n\t${name}-><field> ...
.
Note no trailing line break and but a starting line break, see Pretty printing functions and helpers.
void oxr_pp_space_indented | ( | struct oxr_sink_logger * | slog, |
const struct oxr_space * | spc, | ||
const char * | name | ||
) |
#include <state_trackers/oxr/oxr_pretty_print.h>
Prints a space to a oxr_sink_logger, on the form of \n\t${name}-><field> ...
.
Note no trailing line break and but a starting line break, see Pretty printing functions and helpers.
References oxr_slog(), and oxr_space::space_type.
|
inlinestatic |
#include <state_trackers/oxr/oxr_objects.h>
Increase the reference count of orc
.
|
inlinestatic |
#include <state_trackers/oxr/oxr_objects.h>
Decrease the reference count of orc
, destroying it if it reaches 0.
XrResult oxr_session_attach_action_sets | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
const XrSessionActionSetsAttachInfo * | bindInfo | ||
) |
XrResult oxr_session_begin | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
const XrSessionBeginInfo * | beginInfo | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_instance::extensions, OXR_CHECK_XRET, oxr_error(), oxr_frame_sync::oxr_frame_sync_begin_session(), oxr_session_change_state(), oxr_session::oxr_session_success_result(), and xrt_compositor::xrt_comp_begin_session().
void oxr_session_binding_destroy_all | ( | struct oxr_logger * | log, |
struct oxr_session * | sess | ||
) |
Free all memory allocated by the binding system.
Referenced by oxr_session::oxr_session_attach_action_sets().
void oxr_session_change_state | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
XrSessionState | state, | ||
XrTime | time | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Change the state of the session, queues a event.
Referenced by oxr_session_begin(), and oxr_session_request_exit().
XrResult oxr_session_frame_end | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
const XrFrameEndInfo * | frameEndInfo | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_session::frame_timing_spew, oxr_error(), and time_state::time_state_ts_to_monotonic_ns().
XrResult oxr_session_frame_wait | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
XrFrameState * | frameState | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
XrResult oxr_session_request_exit | ( | struct oxr_logger * | log, |
struct oxr_session * | sess | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_session::has_ended_once, oxr_session_change_state(), and oxr_session::oxr_session_success_result().
|
inlinestatic |
Returns XR_SUCCESS, XR_SESSION_LOSS_PENDING, or XR_SESSION_NOT_FOCUSED, as appropriate.
|
inlinestatic |
Returns XR_SUCCESS or XR_SESSION_LOSS_PENDING as appropriate.
Referenced by oxr_session_begin(), and oxr_session_request_exit().
|
related |
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
Referenced by oxr_event_remove_session_events().
void oxr_slog | ( | struct oxr_sink_logger * | slog, |
const char * | fmt, | ||
... | |||
) |
#include <state_trackers/oxr/oxr_logger.h>
Log string to sink logger.
Referenced by oxr_input_transform::oxr_input_transform_create_chain(), oxr_input_transform::oxr_input_transform_create_chain_dpad(), oxr_pp_fov_indented_as_object(), and oxr_pp_space_indented().
void void oxr_slog_add_array | ( | struct oxr_sink_logger * | slog, |
const char * | str, | ||
size_t | size | ||
) |
#include <state_trackers/oxr/oxr_logger.h>
Add the string to the slog struct.
Referenced by oxr_slog_dg().
void oxr_slog_cancel | ( | struct oxr_sink_logger * | slog | ) |
#include <state_trackers/oxr/oxr_logger.h>
Cancel logging, frees all internal data.
|
inlinestatic |
#include <state_trackers/oxr/oxr_logger.h>
Get a pretty print delegate from a oxr_sink_logger.
References oxr_slog_add_array().
XrResult oxr_space_locate | ( | struct oxr_logger * | log, |
struct oxr_space * | spc, | ||
struct oxr_space * | baseSpc, | ||
XrTime | time, | ||
XrSpaceLocation * | location | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
XRT_CHECK_RESULT XrResult oxr_space_locate_device | ( | struct oxr_logger * | log, |
struct xrt_device * | xdev, | ||
struct oxr_space * | baseSpc, | ||
XrTime | time, | ||
struct xrt_space_relation * | out_relation | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Locate the xrt_device in the given base space, useful for implementing hand tracking location look ups and the like.
log | Logging struct. | |
xdev | Device to locate in the base space. | |
baseSpc | Base space where the device is to be located. | |
[in] | time | Time in OpenXR domain. |
[out] | out_relation | Returns T_base_xdev, aka xdev in base space. |
|
inlinestatic |
#include <state_trackers/oxr/oxr_objects.h>
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
XrResult oxr_space_xdev_pose_create | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
struct xrt_device * | xdev, | ||
enum xrt_input_name | name, | ||
const struct xrt_pose * | pose, | ||
struct oxr_space ** | out_space | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Monado special space that always points to a specific xrt_device and pose, useful when you want to bypass the action binding system for instance.
References xrt_pose::math_pose_validate(), oxr_handle_base::OXR_ALLOCATE_HANDLE_OR_RETURN, OXR_CHECK_XRET, oxr_error(), oxr_space::pose, xrt_space_overseer::xrt_space_overseer_create_pose_space(), and oxr_system::xso.
XrResult oxr_spaces_locate | ( | struct oxr_logger * | log, |
struct oxr_space ** | spcs, | ||
uint32_t | spc_count, | ||
struct oxr_space * | baseSpc, | ||
XrTime | time, | ||
XrSpaceLocations * | locations | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
|
inlinestatic |
Helper function to determine if the set of paths in a
is a subset of the paths in b
.
References OXR_FOR_EACH_SUBACTION_PATH.
Referenced by oxr_verify_subaction_path_sync().
|
inlinestatic |
#include <state_trackers/oxr/oxr_objects.h>
To go back to a OpenXR object.
References XRT_CAST_PTR_TO_OXR_HANDLE.
XrResult oxr_system_enumerate_blend_modes | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
XrViewConfigurationType | viewConfigurationType, | ||
uint32_t | environmentBlendModeCapacityInput, | ||
uint32_t * | environmentBlendModeCountOutput, | ||
XrEnvironmentBlendMode * | environmentBlendModes | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
XrResult oxr_system_fill_in | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrSystemId | systemId, | ||
uint32_t | view_count, | ||
struct oxr_system * | sys | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_system::dynamic_roles_cache, oxr_system::suggested_vulkan_physical_device, U_LOG_D, U_ZERO, oxr_system::vulkan_enable2_instance, xrt_system_roles::XRT_SYSTEM_ROLES_INIT, and oxr_system::xsysc.
XrResult oxr_vk_create_vulkan_device | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
const XrVulkanDeviceCreateInfoKHR * | createInfo, | ||
VkDevice * | vulkanDevice, | ||
VkResult * | vulkanResult | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References u_string_list::u_string_list_create_from_array(), and oxr_system::vulkan_enable2_instance.
XrResult oxr_vk_create_vulkan_instance | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
const XrVulkanInstanceCreateInfoKHR * | createInfo, | ||
VkInstance * | vulkanInstance, | ||
VkResult * | vulkanResult | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
void oxr_warn_slog | ( | struct oxr_logger * | log, |
struct oxr_sink_logger * | slog | ||
) |
#include <state_trackers/oxr/oxr_logger.h>
Flush sink as a warning message, frees all internal data.
bool oxr_xdev_find_input | ( | struct xrt_device * | xdev, |
enum xrt_input_name | name, | ||
struct xrt_input ** | out_input | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Return true if it finds an input of that name on this device.
References xrt_device::input_count, xrt_device::inputs, and xrt_device::name.
bool oxr_xdev_find_output | ( | struct xrt_device * | xdev, |
enum xrt_output_name | name, | ||
struct xrt_output ** | out_output | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Return true if it finds an output of that name on this device.
References xrt_device::name, xrt_device::output_count, and xrt_device::outputs.
void oxr_xdev_get_hand_tracking_at | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
struct xrt_device * | xdev, | ||
enum xrt_input_name | name, | ||
XrTime | at_time, | ||
struct xrt_hand_joint_set * | out_value | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Returns the hand tracking value of the named input from the device.
Does NOT apply tracking origin offset to each joint.
Convert at_time to monotonic and give to device.
References time_state::time_state_ts_to_monotonic_ns(), and xrt_device::xrt_device_get_hand_tracking().