Monado OpenXR Runtime
|
Object that client program interact with. More...
#include <oxr/oxr_objects.h>
Public Member Functions | |
oxr_input.c | |
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. More... | |
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_enumerate_bound_sources (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, uint32_t sourceCapacityInput, uint32_t *sourceCountOutput, XrPath *sources) |
XrResult | oxr_action_get_boolean (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateBoolean *data) |
XrResult | oxr_action_get_vector1f (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateFloat *data) |
XrResult | oxr_action_get_vector2f (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateVector2f *data) |
XrResult | oxr_action_get_pose (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStatePose *data) |
XrResult | oxr_action_apply_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, const XrHapticBaseHeader *hapticEvent) |
XrResult | oxr_action_stop_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths) |
oxr_binding.c | |
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. More... | |
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) |
Public Member Functions inherited from oxr_handle_base | |
XrResult | oxr_handle_destroy (struct oxr_logger *log, struct oxr_handle_base *hb) |
Destroy the handle's object, as well as all child handles recursively. More... | |
Data Fields | |
struct oxr_handle_base | handle |
Common structure for things referred to by OpenXR handles. More... | |
struct oxr_system * | sys |
enum oxr_session_graphics_ext | gfx_ext |
What graphics type was this session created with. More... | |
struct xrt_session * | xs |
The xrt_session backing this session. More... | |
struct xrt_compositor_native * | xcn |
Native compositor that is wrapped by client compositors. More... | |
struct xrt_compositor * | compositor |
struct oxr_session * | next |
XrSessionState | state |
bool | has_ended_once |
There is a extra state between xrBeginSession has been called and the first xrEndFrame has been called. More... | |
bool | compositor_visible |
bool | compositor_focused |
int | active_wait_frames |
struct os_mutex | active_wait_frames_lock |
bool | frame_started |
bool | exiting |
struct { | |
int64_t waited | |
int64_t begun | |
} | frame_id |
struct oxr_frame_sync | frame_sync |
struct os_precise_sleeper | sleeper |
Used to implement precise extra sleeping in wait frame. More... | |
struct oxr_action_set_attachment * | act_set_attachments |
An array of action set attachments that this session owns. More... | |
size_t | action_set_attachment_count |
Length of oxr_session::act_set_attachments. More... | |
struct u_hashmap_int * | act_sets_attachments_by_key |
A map of action set key to action set attachments. More... | |
struct u_hashmap_int * | act_attachments_by_key |
A map of action key to action attachment. More... | |
size_t | profiles_on_attachment_size |
Clone of all suggested binding profiles at the point of action set/session attachment. More... | |
struct oxr_interaction_profile ** | profiles_on_attachment |
float | ipd_meters |
IPD, to be expanded to a proper 3D relation. More... | |
bool | frame_timing_spew |
Frame timing debug output. More... | |
uint32_t | frame_timing_wait_sleep_ms |
Extra sleep in wait frame. More... | |
XrResult(* | create_swapchain )(struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **) |
To pipe swapchain creation to right code. More... | |
struct xrt_space_relation | local_space_pure_relation |
initial relation of head in "global" space. More... | |
bool | has_lost |
XrPath | left |
XrPath | right |
XrPath | head |
XrPath | gamepad |
XrPath | eyes |
Data Fields inherited from oxr_handle_base | |
uint64_t | debug |
Magic (per-handle-type) value for debugging. More... | |
struct oxr_handle_base * | parent |
Pointer to this object's parent handle holder, if any. More... | |
struct oxr_handle_base * | children [256] |
Array of children, if any. More... | |
enum oxr_handle_state | state |
Current handle state. More... | |
oxr_handle_destroyer | destroy |
Destroy the object this handle refers to. More... | |
oxr_session.c | |
static XrSession | oxr_session_to_openxr (struct oxr_session *sess) |
To go back to a OpenXR object. More... | |
static XrResult | oxr_session_success_result (struct oxr_session *session) |
Returns XR_SUCCESS or XR_SESSION_LOSS_PENDING as appropriate. More... | |
static XrResult | oxr_session_success_focused_result (struct oxr_session *session) |
Returns XR_SUCCESS, XR_SESSION_LOSS_PENDING, or XR_SESSION_NOT_FOCUSED, as appropriate. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from oxr_handle_base | |
XrResult | oxr_handle_init (struct oxr_logger *log, struct oxr_handle_base *hb, uint64_t debug, oxr_handle_destroyer destroy, struct oxr_handle_base *parent) |
Initialize a handle holder, and if a parent is specified, update its child list to include this handle. More... | |
Related Functions inherited from oxr_handle_base | |
typedef XrResult(* | oxr_handle_destroyer) (struct oxr_logger *log, struct oxr_handle_base *hb) |
Function pointer type for a handle destruction function. More... | |
XrResult | oxr_handle_allocate_and_init (struct oxr_logger *log, size_t size, uint64_t debug, oxr_handle_destroyer destroy, struct oxr_handle_base *parent, void **out) |
Allocate some memory for use as a handle, and initialize it as a handle. More... | |
#define | OXR_ALLOCATE_HANDLE(LOG, OUT, DEBUG, DESTROY, PARENT) oxr_handle_allocate_and_init(LOG, sizeof(*OUT), DEBUG, DESTROY, PARENT, (void **)&OUT) |
Allocates memory for a handle and evaluates to an XrResult. More... | |
#define | OXR_ALLOCATE_HANDLE_OR_RETURN(LOG, OUT, DEBUG, DESTROY, PARENT) |
Allocate memory for a handle, returning in case of failure. More... | |
const char * | oxr_handle_state_to_string (enum oxr_handle_state state) |
Returns a human-readable label for a handle state. More... | |
Object that client program interact with.
Parent type/handle is oxr_instance
struct u_hashmap_int* oxr_session::act_attachments_by_key |
A map of action key to action attachment.
The action attachments are actually owned by the action set attachments, but we own the action set attachments, so this is OK.
If non-null, this means action sets have been attached to this session, since this map points to oxr_action_attachment
members of oxr_session::act_set_attachments elements.
struct oxr_action_set_attachment* oxr_session::act_set_attachments |
An array of action set attachments that this session owns.
If non-null, this means action sets have been attached to this session.
Referenced by oxr_action_sync_data().
struct u_hashmap_int* oxr_session::act_sets_attachments_by_key |
A map of action set key to action set attachments.
If non-null, this means action sets have been attached to this session, since this map points to elements of oxr_session::act_set_attachments
size_t oxr_session::action_set_attachment_count |
Length of oxr_session::act_set_attachments.
XrResult(* oxr_session::create_swapchain) (struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **) |
To pipe swapchain creation to right code.
bool oxr_session::frame_timing_spew |
Frame timing debug output.
Referenced by oxr_session_frame_end().
uint32_t oxr_session::frame_timing_wait_sleep_ms |
Extra sleep in wait frame.
enum oxr_session_graphics_ext oxr_session::gfx_ext |
What graphics type was this session created with.
struct oxr_handle_base oxr_session::handle |
Common structure for things referred to by OpenXR handles.
bool oxr_session::has_ended_once |
There is a extra state between xrBeginSession has been called and the first xrEndFrame has been called.
These are to track this.
Referenced by oxr_session_request_exit().
float oxr_session::ipd_meters |
IPD, to be expanded to a proper 3D relation.
struct xrt_space_relation oxr_session::local_space_pure_relation |
initial relation of head in "global" space.
Used as reference for local space.
size_t oxr_session::profiles_on_attachment_size |
Clone of all suggested binding profiles at the point of action set/session attachment.
oxr_session_attach_action_sets
Referenced by oxr_session_attach_action_sets().
struct os_precise_sleeper oxr_session::sleeper |
Used to implement precise extra sleeping in wait frame.
struct xrt_compositor_native* oxr_session::xcn |
Native compositor that is wrapped by client compositors.
struct xrt_session* oxr_session::xs |
The xrt_session backing this session.