Monado OpenXR Runtime
|
Gets called from OpenXR entrypoints functions and talks to devices and Compositor using XRT interfaces. More...
Files | |
file | oxr_binding.c |
Holds binding related functions. | |
file | oxr_binding_data.h |
Holds shipped binding data. | |
file | oxr_event.c |
Holds event related functions. | |
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 |
Contains the instance struct that a lot of things hang from. | |
file | oxr_path.c |
Holds path related functions. | |
file | oxr_session.c |
Holds session related functions. | |
file | oxr_session_egl.c |
Holds OpenGL-specific session functions. | |
file | oxr_session_gl.c |
Holds OpenGL-specific session functions. | |
file | oxr_session_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_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. | |
Data Structures | |
struct | oxr_logger |
Logger struct that lives on the stack, one for each call client call. 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_interaction_profile |
A single interaction profile. More... | |
struct | oxr_binding |
Interaction profile binding state. More... | |
struct | oxr_sub_paths |
To carry around a sementic selection of sub action paths. More... | |
struct | oxr_source_set |
Session input source. More... | |
struct | oxr_source_state |
The state of a action input source. More... | |
struct | oxr_source_input |
A input source pair of a xrt_input and a xrt_device. More... | |
struct | oxr_source_output |
A output source pair of a xrt_output_name and a xrt_device. More... | |
struct | oxr_source_cache |
A set of inputs for a single sub action path. More... | |
struct | oxr_source |
Session input source. More... | |
struct | oxr_space |
Can be one of 3 references or a space that are bound to actions. More... | |
struct | oxr_swapchain |
A set of images used for rendering. More... | |
struct | oxr_action_set |
A group of actions. More... | |
struct | oxr_action |
A single action. More... | |
struct | oxr_debug_messenger |
Debug object created by the client program. 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 | OXR_XR_DEBUG_INSTANCE (*(uint64_t *)"oxrinst\0") |
#define | OXR_XR_DEBUG_SESSION (*(uint64_t *)"oxrsess\0") |
#define | OXR_XR_DEBUG_SPACE (*(uint64_t *)"oxrspac\0") |
#define | OXR_XR_DEBUG_PATH (*(uint64_t *)"oxrpath\0") |
#define | OXR_XR_DEBUG_ACTION (*(uint64_t *)"oxracti\0") |
#define | OXR_XR_DEBUG_SWAPCHAIN (*(uint64_t *)"oxrswap\0") |
#define | OXR_XR_DEBUG_ACTIONSET (*(uint64_t *)"oxraset\0") |
#define | OXR_XR_DEBUG_MESSENGER (*(uint64_t *)"oxrmess\0") |
#define | OXR_XR_DEBUG_SOURCESET (*(uint64_t *)"oxrsrcs\0") |
#define | OXR_XR_DEBUG_SOURCE (*(uint64_t *)"oxrsrc_\0") |
#define | XRT_MAX_HANDLE_CHILDREN 256 |
#define | MAKE_EXT_STATUS(mixed_case, all_caps) bool mixed_case; |
Typedefs | |
typedef XrResult(* | oxr_handle_destroyer) (struct oxr_logger *log, struct oxr_handle_base *hb) |
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_sub_action_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 } |
Sub action paths. More... | |
Functions | |
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. More... | |
const char * | oxr_handle_state_to_string (enum oxr_handle_state state) |
Returns a human-readable label for a handle state. More... | |
XrResult | oxr_instance_create (struct oxr_logger *log, const XrInstanceCreateInfo *createInfo, struct oxr_instance **out_inst) |
XrResult | oxr_instance_get_properties (struct oxr_logger *log, struct oxr_instance *inst, XrInstanceProperties *instanceProperties) |
XrResult | oxr_instance_convert_time_to_timespec (struct oxr_logger *log, struct oxr_instance *inst, XrTime time, struct timespec *timespecTime) |
XrResult | oxr_instance_convert_timespec_to_time (struct oxr_logger *log, struct oxr_instance *inst, const struct timespec *timespecTime, XrTime *time) |
void * | oxr_path_get_attached (struct oxr_logger *log, struct oxr_instance *inst, XrPath path) |
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. More... | |
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. More... | |
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. More... | |
void | oxr_path_destroy_all (struct oxr_logger *log, struct oxr_instance *inst) |
Destroy all paths that the instance has created. More... | |
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. More... | |
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. More... | |
XrResult | 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_create (struct oxr_logger *log, struct oxr_action_set *act_set, const XrActionCreateInfo *createInfo, struct oxr_action **out_act) |
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) |
XrResult | oxr_action_get_boolean (struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStateBoolean *data) |
XrResult | oxr_action_get_vector1f (struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStateFloat *data) |
XrResult | oxr_action_get_vector2f (struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStateVector2f *data) |
XrResult | oxr_action_get_pose (struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths, XrActionStatePose *data) |
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) |
XrResult | oxr_action_stop_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint64_t key, struct oxr_sub_paths sub_paths) |
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. More... | |
void | oxr_binding_destroy_all (struct oxr_logger *log, struct oxr_instance *inst) |
Free all memory allocated by the binding system. More... | |
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. More... | |
XrResult | oxr_action_suggest_interaction_profile_bindings (struct oxr_logger *log, struct oxr_instance *inst, const XrInteractionProfileSuggestedBinding *suggestedBindings) |
XrResult | oxr_action_get_current_interaction_profile (struct oxr_logger *log, struct oxr_session *sess, XrPath topLevelUserPath, XrInteractionProfileState *interactionProfile) |
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) |
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) |
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) |
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) |
void | oxr_session_poll (struct oxr_session *sess) |
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. More... | |
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) |
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_space_action_create (struct oxr_logger *log, struct oxr_session *sess, uint64_t key, const XrActionSpaceCreateInfo *createInfo, struct oxr_space **out_space) |
XrResult | oxr_space_reference_create (struct oxr_logger *log, struct oxr_session *sess, const XrReferenceSpaceCreateInfo *createInfo, struct oxr_space **out_space) |
XrResult | oxr_space_locate (struct oxr_logger *log, struct oxr_space *spc, struct oxr_space *baseSpc, XrTime time, XrSpaceLocation *location) |
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, assumes that both spaces are reference spaces. More... | |
XrResult | oxr_create_swapchain (struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **out_swapchain) |
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 num_systems, XrFormFactor form_factor, struct oxr_system **out_selected) |
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) |
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) |
XrResult | oxr_poll_event (struct oxr_logger *log, struct oxr_instance *inst, XrEventDataBuffer *eventData) |
XrResult | oxr_event_push_XrEventDataSessionStateChanged (struct oxr_logger *log, struct oxr_session *sess, XrSessionState state, XrTime time) |
void | oxr_xdev_destroy (struct xrt_device **xdev_ptr) |
void | oxr_xdev_update (struct xrt_device *xdev) |
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_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 instead. More... | |
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 is valid by using the device offset. 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_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) |
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,...) |
Log string to sink logger. More... | |
void | oxr_slog_abort (struct oxr_sink_logger *slog) |
Abort 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... | |
Gets called from OpenXR entrypoints functions and talks to devices and Compositor using XRT interfaces.
#define MAKE_EXT_STATUS | ( | mixed_case, | |
all_caps | |||
) | bool mixed_case; |
#include <state_trackers/oxr/oxr_objects.h>
#define OXR_WARN_ONCE | ( | log, | |
... | |||
) |
#include <state_trackers/oxr/oxr_logger.h>
Helper macro to log a warning just once.
Referenced by oxr_vk_get_physical_device().
#define OXR_XR_DEBUG_ACTION (*(uint64_t *)"oxracti\0") |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_action_create().
#define OXR_XR_DEBUG_ACTIONSET (*(uint64_t *)"oxraset\0") |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_action_set_create().
#define OXR_XR_DEBUG_INSTANCE (*(uint64_t *)"oxrinst\0") |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_instance_create().
#define OXR_XR_DEBUG_MESSENGER (*(uint64_t *)"oxrmess\0") |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_create_messenger().
#define OXR_XR_DEBUG_PATH (*(uint64_t *)"oxrpath\0") |
#include <state_trackers/oxr/oxr_objects.h>
#define OXR_XR_DEBUG_SESSION (*(uint64_t *)"oxrsess\0") |
#include <state_trackers/oxr/oxr_objects.h>
#define OXR_XR_DEBUG_SOURCE (*(uint64_t *)"oxrsrc_\0") |
#include <state_trackers/oxr/oxr_objects.h>
#define OXR_XR_DEBUG_SOURCESET (*(uint64_t *)"oxrsrcs\0") |
#include <state_trackers/oxr/oxr_objects.h>
#define OXR_XR_DEBUG_SPACE (*(uint64_t *)"oxrspac\0") |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_space_action_create().
#define OXR_XR_DEBUG_SWAPCHAIN (*(uint64_t *)"oxrswap\0") |
#include <state_trackers/oxr/oxr_objects.h>
#define XRT_MAX_HANDLE_CHILDREN 256 |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_create_messenger().
typedef XrResult(* oxr_handle_destroyer) (struct oxr_logger *log, struct oxr_handle_base *hb) |
#include <state_trackers/oxr/oxr_objects.h>
enum oxr_handle_state |
#include <state_trackers/oxr/oxr_objects.h>
State of a handle base, to reduce likelihood of going "boom" on out-of-order destruction or other unsavory behavior.
enum oxr_sub_action_path |
#include <state_trackers/oxr/oxr_objects.h>
Sub action paths.
Enumerator | |
---|---|
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 |
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrApplyHapticFeedback().
XrResult oxr_action_create | ( | struct oxr_logger * | log, |
struct oxr_action_set * | act_set, | ||
const XrActionCreateInfo * | createInfo, | ||
struct oxr_action ** | out_act | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_action_set::inst, OXR_ALLOCATE_HANDLE_OR_RETURN, oxr_classify_sub_action_paths(), and OXR_XR_DEBUG_ACTION.
Referenced by oxr_xrCreateAction().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_error().
Referenced by oxr_xrEnumerateBoundSourcesForAction().
XrResult oxr_action_get_boolean | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint64_t | key, | ||
struct oxr_sub_paths | sub_paths, | ||
XrActionStateBoolean * | data | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrGetActionStateBoolean().
XrResult oxr_action_get_current_interaction_profile | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
XrPath | topLevelUserPath, | ||
XrInteractionProfileState * | interactionProfile | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_session::actionsAttached, oxr_instance::gamepad, oxr_session::gamepad, oxr_instance::head, oxr_session::head, oxr_system::inst, oxr_instance::left, oxr_session::left, oxr_error(), oxr_instance::path_cache, oxr_instance::right, oxr_session::right, and oxr_session::sys.
Referenced by oxr_xrGetCurrentInteractionProfile().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_error().
Referenced by oxr_xrGetInputSourceLocalizedName().
XrResult oxr_action_get_pose | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint64_t | key, | ||
struct oxr_sub_paths | sub_paths, | ||
XrActionStatePose * | data | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrGetActionStatePose().
XrResult oxr_action_get_vector1f | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint64_t | key, | ||
struct oxr_sub_paths | sub_paths, | ||
XrActionStateFloat * | data | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrGetActionStateFloat().
XrResult oxr_action_get_vector2f | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint64_t | key, | ||
struct oxr_sub_paths | sub_paths, | ||
XrActionStateVector2f * | data | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrGetActionStateVector2f().
XrResult oxr_action_set_create | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
const XrActionSetCreateInfo * | createInfo, | ||
struct oxr_action_set ** | out_act_set | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References OXR_ALLOCATE_HANDLE_OR_RETURN, and OXR_XR_DEBUG_ACTIONSET.
Referenced by oxr_xrCreateActionSet().
XrResult oxr_action_stop_haptic_feedback | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint64_t | key, | ||
struct oxr_sub_paths | sub_paths | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrStopHapticFeedback().
XrResult oxr_action_suggest_interaction_profile_bindings | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
const XrInteractionProfileSuggestedBinding * | suggestedBindings | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrSuggestInteractionProfileBindings().
XrResult oxr_action_sync_data | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint32_t | countActionSets, | ||
const XrActiveActionSet * | actionSets | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrSyncActions().
void oxr_binding_destroy_all | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Free all memory allocated by the binding system.
References oxr_interaction_profile::bindings, oxr_interaction_profile::num_bindings, oxr_instance::num_profiles, and oxr_instance::profiles.
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Find all bindings that is the given action key is bound to.
References oxr_interaction_profile::bindings, oxr_binding::keys, oxr_interaction_profile::num_bindings, and oxr_binding::num_keys.
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Helper function to classify sub_paths.
References oxr_sub_paths::any, oxr_instance::gamepad, oxr_sub_paths::gamepad, oxr_instance::head, oxr_sub_paths::head, oxr_instance::left, oxr_sub_paths::left, oxr_path_get_string(), oxr_warn(), oxr_instance::path_cache, oxr_instance::right, oxr_sub_paths::right, U_ZERO, oxr_instance::user, and oxr_sub_paths::user.
Referenced by oxr_action_create().
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>
References oxr_instance::messengers, OXR_ALLOCATE_HANDLE_OR_RETURN, oxr_error(), OXR_XR_DEBUG_MESSENGER, and XRT_MAX_HANDLE_CHILDREN.
Referenced by oxr_xrCreateDebugUtilsMessengerEXT().
XrResult oxr_create_swapchain | ( | struct oxr_logger * | , |
struct oxr_session * | sess, | ||
const XrSwapchainCreateInfo * | , | ||
struct oxr_swapchain ** | out_swapchain | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_swapchain_gl_create(), and oxr_swapchain_vk_create().
XrResult oxr_destroy_messenger | ( | struct oxr_logger * | log, |
struct oxr_debug_messenger * | mssngr | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
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(), and oxr_sink_logger::store.
XrResult oxr_event_push_XrEventDataSessionStateChanged | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
XrSessionState | state, | ||
XrTime | time | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References ALLOC, oxr_system::inst, and oxr_session::sys.
void oxr_find_profile_for_device | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
struct xrt_device * | xdev, | ||
struct oxr_interaction_profile ** | out_p | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Find the best matching profile for the given xrt_device.
log | Logger. | |
inst | Instance. | |
xdev | Can be null. | |
[out] | out_p | Returned interaction profile. |
References xrt_device::name, and XRT_DEVICE_HYDRA.
Referenced by oxr_session_attach_action_sets().
XrResult oxr_handle_destroy | ( | struct oxr_logger * | log, |
struct oxr_handle_base * | hb | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Destroy the handle's object, as well as all child handles recursively.
This should be how all handle-associated objects are destroyed.
References HANDLE_LIFECYCLE_LOG_SCOPED, and HANDLE_LIFECYCLE_LOG_SCOPED_BEGIN.
Referenced by oxr_xrDestroyAction(), oxr_xrDestroyActionSet(), oxr_xrDestroyDebugUtilsMessengerEXT(), oxr_xrDestroyInstance(), oxr_xrDestroySession(), oxr_xrDestroySpace(), and oxr_xrDestroySwapchain().
const char* oxr_handle_state_to_string | ( | enum oxr_handle_state | state | ) |
#include <state_trackers/oxr/oxr_objects.h>
Returns a human-readable label for a handle state.
References OXR_HANDLE_STATE_DESTROYED, OXR_HANDLE_STATE_LIVE, and OXR_HANDLE_STATE_UNINITIALIZED.
XrResult oxr_instance_convert_time_to_timespec | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrTime | time, | ||
struct timespec * | timespecTime | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References time_state::time_state_to_timespec(), and oxr_instance::timekeeping.
Referenced by oxr_xrConvertTimeToTimespecTimeKHR().
XrResult oxr_instance_convert_timespec_to_time | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
const struct timespec * | timespecTime, | ||
XrTime * | time | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References time_state::time_state_from_timespec(), and oxr_instance::timekeeping.
Referenced by oxr_xrConvertTimespecTimeToTimeKHR().
XrResult oxr_instance_create | ( | struct oxr_logger * | log, |
const XrInstanceCreateInfo * | createInfo, | ||
struct oxr_instance ** | out_inst | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References NUM_XDEVS, OXR_ALLOCATE_HANDLE_OR_RETURN, and OXR_XR_DEBUG_INSTANCE.
Referenced by oxr_xrCreateInstance().
XrResult oxr_instance_get_properties | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrInstanceProperties * | instanceProperties | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrGetInstanceProperties().
void oxr_log | ( | struct oxr_logger * | logger, |
const char * | fmt, | ||
... | |||
) |
#include <state_trackers/oxr/oxr_logger.h>
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 | ||
) |
#include <state_trackers/oxr/oxr_logger.h>
References oxr_logger::inst.
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.
References oxr_log(), and oxr_sink_logger::store.
void oxr_path_destroy_all | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Destroy all paths that the instance has created.
References destroy_callback(), oxr_instance::path_store, and u_hashset_clear_and_call_for_each().
void* oxr_path_get_attached | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrPath | path | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
XrResult oxr_path_get_or_create | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
const char * | str, | ||
size_t | length, | ||
XrPath * | out_path | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Get the path for the given string if it exists, or create it if it does not.
References oxr_instance::path_store, and u_hashset_find_str().
Referenced by oxr_xrStringToPath().
XrResult oxr_path_get_string | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrPath | path, | ||
const char ** | out_str, | ||
size_t * | out_length | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
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 a extra null byte is always reserved at the end so can strings can be given to functions expecting null terminated strings).
Referenced by oxr_classify_sub_action_paths(), oxr_verify_subaction_path_get(), oxr_verify_subaction_path_sync(), and oxr_xrPathToString().
XrResult oxr_path_only_get | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
const char * | str, | ||
size_t | length, | ||
XrPath * | out_path | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Only get the path for the given string if it exists.
References oxr_instance::path_store, and u_hashset_find_str().
XrResult oxr_poll_event | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrEventDataBuffer * | eventData | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References lock(), oxr_session::next, oxr_event_extra(), oxr_session_poll(), pop(), oxr_instance::sessions, and unlock().
Referenced by oxr_xrPollEvent().
XrResult oxr_session_attach_action_sets | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
const XrSessionActionSetsAttachInfo * | bindInfo | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_action_set::attached, oxr_system::head, oxr_system::inst, oxr_system::left, oxr_find_profile_for_device(), oxr_system::right, and oxr_session::sys.
Referenced by oxr_xrAttachSessionActionSets().
XrResult oxr_session_begin | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
const XrSessionBeginInfo * | beginInfo | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrBeginSession().
XrResult oxr_session_create | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
const XrSessionCreateInfo * | createInfo, | ||
struct oxr_session ** | out_session | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrCreateSession().
XrResult oxr_session_end | ( | struct oxr_logger * | log, |
struct oxr_session * | sess | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_session::compositor.
Referenced by oxr_xrEndSession().
XrResult oxr_session_enumerate_formats | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint32_t | formatCapacityInput, | ||
uint32_t * | formatCountOutput, | ||
int64_t * | formats | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_session::compositor, and oxr_error().
Referenced by oxr_xrEnumerateSwapchainFormats().
XrResult oxr_session_frame_begin | ( | struct oxr_logger * | log, |
struct oxr_session * | sess | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrBeginFrame().
XrResult oxr_session_frame_end | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
const XrFrameEndInfo * | frameEndInfo | ||
) |
XrResult oxr_session_frame_wait | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
XrFrameState * | frameState | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrWaitFrame().
XrResult oxr_session_get_view_pose_at | ( | struct oxr_logger * | , |
struct oxr_session * | sess, | ||
XrTime | at_time, | ||
struct xrt_pose * | |||
) |
#include <state_trackers/oxr/oxr_objects.h>
Get the view space position at the given time in relation to the local or stage space.
References oxr_system::head, oxr_system::inst, oxr_xdev_get_relation_at(), xrt_space_relation::pose, xrt_space_relation::relation_flags, oxr_session::sys, timestamp, XRT_INPUT_GENERIC_HEAD_POSE, XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT, XRT_SPACE_RELATION_ORIENTATION_VALID_BIT, and XRT_SPACE_RELATION_POSITION_VALID_BIT.
Referenced by oxr_space_ref_relation().
void oxr_session_poll | ( | struct oxr_session * | sess | ) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_session::compositor.
Referenced by oxr_poll_event().
XrResult oxr_session_populate_gl_xlib | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
XrGraphicsBindingOpenGLXlibKHR const * | next, | ||
struct oxr_session * | sess | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
XrResult oxr_session_populate_vk | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
XrGraphicsBindingVulkanKHR const * | next, | ||
struct oxr_session * | sess | ||
) |
#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>
Referenced by oxr_xrRequestExitSession().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_system::head, oxr_space::is_reference, and oxr_session::sys.
Referenced by oxr_xrLocateViews().
void oxr_slog | ( | struct oxr_sink_logger * | slog, |
const char * | fmt, | ||
... | |||
) |
#include <state_trackers/oxr/oxr_logger.h>
Log string to sink logger.
void oxr_slog_abort | ( | struct oxr_sink_logger * | slog | ) |
#include <state_trackers/oxr/oxr_logger.h>
Abort logging, frees all internal data.
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Find the pose input for the set of sub_paths.
Referenced by oxr_space_action_relation().
XrResult oxr_space_action_create | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
uint64_t | key, | ||
const XrActionSpaceCreateInfo * | createInfo, | ||
struct oxr_space ** | out_space | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_system::inst, OXR_ALLOCATE_HANDLE_OR_RETURN, OXR_XR_DEBUG_SPACE, and oxr_session::sys.
Referenced by oxr_xrCreateActionSpace().
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>
References oxr_instance::debug_spaces, oxr_system::inst, oxr_space::sess, and oxr_session::sys.
Referenced by oxr_xrLocateSpace().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
This returns only the relation between two spaces without any of the app given relations applied, assumes that both spaces are reference spaces.
References xrt_pose::math_pose_invert(), xrt_space_relation::math_relation_reset(), oxr_session_get_view_pose_at(), xrt_space_relation::pose, xrt_space_relation::relation_flags, XRT_SPACE_RELATION_BITMASK_NONE, XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT, XRT_SPACE_RELATION_ORIENTATION_VALID_BIT, XRT_SPACE_RELATION_POSITION_TRACKED_BIT, and XRT_SPACE_RELATION_POSITION_VALID_BIT.
XrResult oxr_space_reference_create | ( | struct oxr_logger * | log, |
struct oxr_session * | sess, | ||
const XrReferenceSpaceCreateInfo * | createInfo, | ||
struct oxr_space ** | out_space | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Referenced by oxr_xrCreateReferenceSpace().
XrResult oxr_swapchain_gl_create | ( | struct oxr_logger * | , |
struct oxr_session * | sess, | ||
const XrSwapchainCreateInfo * | , | ||
struct oxr_swapchain ** | out_swapchain | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_swapchain::destroy, and oxr_create_swapchain().
XrResult oxr_swapchain_vk_create | ( | struct oxr_logger * | , |
struct oxr_session * | sess, | ||
const XrSwapchainCreateInfo * | , | ||
struct oxr_swapchain ** | out_swapchain | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_swapchain::destroy, and oxr_create_swapchain().
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>
References oxr_system::blend_modes, oxr_system::num_blend_modes, and OXR_TWO_CALL_HELPER.
Referenced by oxr_xrEnumerateEnvironmentBlendModes().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_error(), OXR_TWO_CALL_FILL_IN_HELPER, and oxr_system::view_config_type.
Referenced by oxr_xrEnumerateViewConfigurationViews().
XrResult oxr_system_enumerate_view_confs | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
uint32_t | viewConfigurationTypeCapacityInput, | ||
uint32_t * | viewConfigurationTypeCountOutput, | ||
XrViewConfigurationType * | viewConfigurationTypes | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References OXR_TWO_CALL_HELPER, and oxr_system::view_config_type.
Referenced by oxr_xrEnumerateViewConfigurations().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_system::num_xdevs.
XrResult oxr_system_get_by_id | ( | struct oxr_logger * | log, |
struct oxr_instance * | inst, | ||
XrSystemId | systemId, | ||
struct oxr_system ** | system | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_system_verify_id(), and oxr_instance::system.
XrResult oxr_system_get_properties | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
XrSystemProperties * | properties | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_system::head, xrt_device::str, and oxr_system::systemId.
Referenced by oxr_xrGetSystemProperties().
XrResult oxr_system_get_view_conf_properties | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
XrViewConfigurationType | viewConfigurationType, | ||
XrViewConfigurationProperties * | configurationProperties | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_error(), and oxr_system::view_config_type.
Referenced by oxr_xrGetViewConfigurationProperties().
XrResult oxr_system_select | ( | struct oxr_logger * | log, |
struct oxr_system ** | systems, | ||
uint32_t | num_systems, | ||
XrFormFactor | form_factor, | ||
struct oxr_system ** | out_selected | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_error().
Referenced by oxr_xrGetSystem().
XrResult oxr_system_verify_id | ( | struct oxr_logger * | log, |
const struct oxr_instance * | inst, | ||
XrSystemId | systemId | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References oxr_error().
Referenced by oxr_system_get_by_id(), and oxr_verify_XrSessionCreateInfo().
XrResult oxr_vk_get_device_exts | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
uint32_t | namesCapacityInput, | ||
uint32_t * | namesCountOutput, | ||
char * | namesString | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References OXR_TWO_CALL_HELPER, and xrt_gfx_vk_device_extensions.
Referenced by oxr_xrGetVulkanDeviceExtensionsKHR().
XrResult oxr_vk_get_instance_exts | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
uint32_t | namesCapacityInput, | ||
uint32_t * | namesCountOutput, | ||
char * | namesString | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References OXR_TWO_CALL_HELPER, and xrt_gfx_vk_instance_extensions.
Referenced by oxr_xrGetVulkanInstanceExtensionsKHR().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References GET_PROC, oxr_error(), OXR_WARN_ONCE, and U_TYPED_ARRAY_CALLOC.
Referenced by oxr_xrGetVulkanGraphicsDeviceKHR().
XrResult oxr_vk_get_requirements | ( | struct oxr_logger * | log, |
struct oxr_system * | sys, | ||
XrGraphicsRequirementsVulkanKHR * | graphicsRequirements | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
References xrt_api_requirements::max_major, xrt_api_requirements::max_minor, xrt_api_requirements::max_patch, xrt_api_requirements::min_major, xrt_api_requirements::min_minor, xrt_api_requirements::min_patch, and xrt_gfx_vk_get_versions().
Referenced by oxr_xrGetVulkanGraphicsRequirementsKHR().
void void oxr_warn | ( | struct oxr_logger * | logger, |
const char * | fmt, | ||
... | |||
) |
#include <state_trackers/oxr/oxr_logger.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.
References oxr_warn(), and oxr_sink_logger::store.
void oxr_xdev_destroy | ( | struct xrt_device ** | xdev_ptr | ) |
#include <state_trackers/oxr/oxr_objects.h>
References xrt_device::destroy.
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::inputs, xrt_input::name, and xrt_device::num_inputs.
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_output::name, xrt_device::num_outputs, and xrt_device::outputs.
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Returns the pose of the named input from the device, if the pose isn't valid uses the device offset instead.
References xrt_pose::orientation, oxr_xdev_get_relation_at(), xrt_space_relation::pose, xrt_pose::position, xrt_space_relation::relation_flags, U_ZERO, XRT_SPACE_RELATION_ORIENTATION_VALID_BIT, and XRT_SPACE_RELATION_POSITION_VALID_BIT.
Referenced by oxr_space_action_relation().
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 | ||
) |
#include <state_trackers/oxr/oxr_objects.h>
Returns the relation of the named input from the device, always ensures that position and orientation is valid by using the device offset.
References xrt_tracking_origin::offset, and xrt_device::tracking_origin.
Referenced by oxr_session_get_view_pose_at(), and oxr_xdev_get_pose_at().
void oxr_xdev_update | ( | struct xrt_device * | xdev | ) |
#include <state_trackers/oxr/oxr_objects.h>
References xrt_device::update_inputs.