Monado OpenXR Runtime
Loading...
Searching...
No Matches
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

XrResult oxr_action_get_input_source_localized_name (struct oxr_logger *log, const struct oxr_path_store *store, const struct oxr_session_action_context *action_context, const XrInputSourceLocalizedNameGetInfo *getInfo, uint32_t bufferCapacityInput, uint32_t *bufferCountOutput, char *buffer)
 Get input source localized name.
 
XrResult oxr_action_get_boolean (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateBoolean *data)
 
XrResult oxr_action_get_vector1f (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateFloat *data)
 
XrResult oxr_action_get_vector2f (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStateVector2f *data)
 
XrResult oxr_action_get_pose (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, XrActionStatePose *data)
 
XrResult oxr_action_get_pose_input (struct oxr_session *sess, uint32_t act_key, const struct oxr_subaction_paths *subaction_paths_ptr, struct oxr_action_input **out_input)
 Find the pose input for the set of subaction_paths.
 
XrResult oxr_session_attach_action_sets (struct oxr_logger *log, struct oxr_session *sess, const XrSessionActionSetsAttachInfo *bindInfo)
 
XrResult oxr_action_sync_data (struct oxr_logger *log, struct oxr_session *sess, uint32_t countActionSets, const XrActiveActionSet *actionSets, const XrActiveActionSetPrioritiesEXT *activePriorities)
 
XrResult oxr_action_enumerate_bound_sources (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, uint32_t sourceCapacityInput, uint32_t *sourceCountOutput, XrPath *sources)
 
XrResult oxr_action_apply_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths, const XrHapticBaseHeader *hapticEvent)
 
XrResult oxr_action_stop_haptic_feedback (struct oxr_logger *log, struct oxr_session *sess, uint32_t act_key, struct oxr_subaction_paths subaction_paths)
 
- Public Member Functions inherited from oxr_handle_base
XrResult oxr_handle_destroy (struct oxr_logger *log, struct oxr_handle_base *hb)
 Destroy the handle's object, as well as all child handles recursively.
 

Data Fields

struct oxr_handle_base handle
 Common structure for things referred to by OpenXR handles.
 
struct oxr_systemsys
 
enum oxr_session_graphics_ext gfx_ext
 What graphics type was this session created with.
 
struct xrt_sessionxs
 The xrt_session backing this session.
 
struct xrt_compositor_nativexcn
 Native compositor that is wrapped by client compositors.
 
struct xrt_compositorcompositor
 
struct oxr_sessionnext
 
XrSessionState state
 
XrViewConfigurationType current_view_config_type
 This is set in xrBeginSession and is the primaryViewConfiguration argument, this is then used in xrEndFrame to know which view configuration the application is submitting it's frame in.
 
bool has_ended_once
 There is a extra state between xrBeginSession has been called and the first xrEndFrame has been called.
 
bool compositor_visible
 
bool compositor_focused
 
int active_wait_frames
 
struct os_mutex active_wait_frames_lock
 
bool frame_started
 
bool exiting
 
struct { 
 
   int64_t   waited 
 
   int64_t   begun 
 
frame_id 
 
struct oxr_frame_sync frame_sync
 
struct os_precise_sleeper sleeper
 Used to implement precise extra sleeping in wait frame.
 
struct oxr_session_action_context action_context
 Holds all the action state that belongs on the session level.
 
struct oxr_session_attached_actions attached_actions
 Per-session map of action key to action attachment (thread-safe).
 
float ipd_meters
 IPD, to be expanded to a proper 3D relation.
 
bool frame_timing_spew
 Frame timing debug output.
 
uint32_t frame_timing_wait_sleep_ms
 Extra sleep in wait frame.
 
XrResult(* create_swapchain )(struct oxr_logger *, struct oxr_session *sess, const XrSwapchainCreateInfo *, struct oxr_swapchain **)
 To pipe swapchain creation to right code.
 
bool has_lost
 initial relation of head in "global" space.
 
- Data Fields inherited from oxr_handle_base
uint64_t debug
 Magic (per-handle-type) value for debugging.
 
struct oxr_handle_baseparent
 Pointer to this object's parent handle holder, if any.
 
struct oxr_handle_basechildren [256]
 Array of children, if any.
 
enum oxr_handle_state state
 Current handle state.
 
oxr_handle_destroyer destroy
 Destroy the object this handle refers to.
 

oxr_session.c

static XrSession oxr_session_to_openxr (struct oxr_session *sess)
 To go back to a OpenXR object.
 
static XrResult oxr_session_success_result (struct oxr_session *session)
 Returns XR_SUCCESS or XR_SESSION_LOSS_PENDING as appropriate.
 
static XrResult oxr_session_success_focused_result (struct oxr_session *session)
 Returns XR_SUCCESS, XR_SESSION_LOSS_PENDING, or XR_SESSION_NOT_FOCUSED, as appropriate.
 

Additional Inherited Members

- Protected Member Functions inherited from oxr_handle_base
XrResult oxr_handle_init (struct oxr_logger *log, struct oxr_handle_base *hb, uint64_t debug, oxr_handle_destroyer destroy, struct oxr_handle_base *parent)
 Initialize a handle holder, and if a parent is specified, update its child list to include this handle.
 

Detailed Description

Object that client program interact with.

Parent type/handle is oxr_instance

OpenXR Object:
XrSession

Member Function Documentation

◆ oxr_action_get_input_source_localized_name()

XrResult oxr_action_get_input_source_localized_name ( struct oxr_logger log,
const struct oxr_path_store store,
const struct oxr_session_action_context action_context,
const XrInputSourceLocalizedNameGetInfo *  getInfo,
uint32_t  bufferCapacityInput,
uint32_t *  bufferCountOutput,
char *  buffer 
)

Get input source localized name.

Parameters
logLogger
path_storeNeeded to look up path strings.
action_contextAction context
getInfoInput source localized name get info
bufferCapacityInputBuffer capacity
bufferCountOutputBuffer count output
bufferBuffer
Returns
XR_SUCCESS on success

References oxr_interaction_profile::localized_name, oxr_error(), and oxr_session_action_context::profiles_on_attachment.

◆ oxr_action_get_pose_input()

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 
)

◆ oxr_session_attach_action_sets()

Field Documentation

◆ action_context

struct oxr_session_action_context oxr_session::action_context

◆ attached_actions

struct oxr_session_attached_actions oxr_session::attached_actions

Per-session map of action key to action attachment (thread-safe).

Referenced by oxr_action_get_pose_input(), and oxr_session_attach_action_sets().

◆ 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.

Referenced by oxr_xrCreateSwapchain().

◆ current_view_config_type

XrViewConfigurationType oxr_session::current_view_config_type

This is set in xrBeginSession and is the primaryViewConfiguration argument, this is then used in xrEndFrame to know which view configuration the application is submitting it's frame in.

Referenced by oxr_xrLocateViews(), and verify_projection_layer().

◆ frame_timing_spew

bool oxr_session::frame_timing_spew

Frame timing debug output.

Referenced by oxr_session_frame_end(), and oxr_session_frame_wait().

◆ frame_timing_wait_sleep_ms

uint32_t oxr_session::frame_timing_wait_sleep_ms

Extra sleep in wait frame.

Referenced by oxr_session_frame_wait().

◆ gfx_ext

enum oxr_session_graphics_ext oxr_session::gfx_ext

What graphics type was this session created with.

Referenced by oxr_xrCreateSwapchain().

◆ handle

struct oxr_handle_base oxr_session::handle

Common structure for things referred to by OpenXR handles.

Referenced by oxr_space_action_create(), oxr_space_xdev_pose_create(), oxr_swapchain_common_create(), and oxr_xrDestroySession().

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

◆ has_lost

bool oxr_session::has_lost

initial relation of head in "global" space.

Used as reference for local space.

◆ ipd_meters

float oxr_session::ipd_meters

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

◆ sleeper

struct os_precise_sleeper oxr_session::sleeper

Used to implement precise extra sleeping in wait frame.

Referenced by oxr_session_frame_wait().

◆ 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: