Monado OpenXR Runtime
oxr_session Struct Reference

Object that client program interact with. More...

#include <oxr/oxr_objects.h>

Inheritance diagram for oxr_session:
Collaboration diagram for oxr_session:

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_systemsys
 
enum oxr_session_graphics_ext gfx_ext
 What graphics type was this session created with. More...
 
struct xrt_sessionxs
 The xrt_session backing this session. More...
 
struct xrt_compositor_nativexcn
 Native compositor that is wrapped by client compositors. More...
 
struct xrt_compositorcompositor
 
struct oxr_sessionnext
 
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_attachmentact_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_intact_sets_attachments_by_key
 A map of action set key to action set attachments. More...
 
struct u_hashmap_intact_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_baseparent
 Pointer to this object's parent handle holder, if any. More...
 
struct oxr_handle_basechildren [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...
 

Detailed Description

Object that client program interact with.

Parent type/handle is oxr_instance

OpenXR Object:
XrSession

Field Documentation

◆ act_attachments_by_key

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.

◆ act_set_attachments

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().

◆ act_sets_attachments_by_key

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

◆ action_set_attachment_count

size_t oxr_session::action_set_attachment_count

◆ create_swapchain

XrResult(* oxr_session::create_swapchain) (struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **)

To pipe swapchain creation to right code.

◆ frame_timing_spew

bool oxr_session::frame_timing_spew

Frame timing debug output.

Referenced by oxr_session_frame_end().

◆ frame_timing_wait_sleep_ms

uint32_t oxr_session::frame_timing_wait_sleep_ms

Extra sleep in wait frame.

◆ gfx_ext

enum oxr_session_graphics_ext oxr_session::gfx_ext

What graphics type was this session created with.

◆ handle

struct oxr_handle_base oxr_session::handle

Common structure for things referred to by OpenXR handles.

◆ has_ended_once

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().

◆ ipd_meters

float oxr_session::ipd_meters

IPD, to be expanded to a proper 3D relation.

◆ local_space_pure_relation

struct xrt_space_relation oxr_session::local_space_pure_relation

initial relation of head in "global" space.

Used as reference for local space.

◆ profiles_on_attachment_size

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().

◆ sleeper

struct os_precise_sleeper oxr_session::sleeper

Used to implement precise extra sleeping in wait frame.

◆ xcn

struct xrt_compositor_native* oxr_session::xcn

Native compositor that is wrapped by client compositors.

◆ xs

struct xrt_session* oxr_session::xs

The xrt_session backing this session.


The documentation for this struct was generated from the following files: