Monado OpenXR Runtime
Files | Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
XRT interfaces

The main interface shared between the different components of Monado. More...

Collaboration diagram for XRT interfaces:

Files

file  xrt_compiler.h
 Header holding common defines.
 
file  xrt_compositor.h
 Header defining a XRT graphics provider.
 
file  xrt_config.h
 Includes all config headers, use separate headers instead.
 
file  xrt_config_os.h
 Auto detect OS and certain features.
 
file  xrt_defines.h
 Common defines and enums for XRT.
 
file  xrt_device.h
 Header defining an xrt HMD device.
 
file  xrt_documentation.h
 Header with just documentation.
 
file  xrt_frame.h
 Data frame header.
 
file  xrt_frameserver.h
 Frameserver interface for video drivers.
 
file  xrt_gfx_egl.h
 Header defining a XRT graphics provider.
 
file  xrt_gfx_gl.h
 Header for misc OpenGL code, not a complete graphics provider.
 
file  xrt_gfx_gles.h
 Header for misc OpenGL ES code, not a complete graphics provider.
 
file  xrt_gfx_native.h
 Header defining a XRT graphics provider.
 
file  xrt_gfx_vk.h
 Header defining a XRT graphics provider.
 
file  xrt_gfx_xlib.h
 Header defining a XRT graphics provider.
 
file  xrt_handles.h
 Native handle types.
 
file  xrt_instance.h
 Header for xrt_instance object.
 
file  xrt_openxr_includes.h
 Include all of the openxr headers in one place.
 
file  xrt_prober.h
 Common interface to probe for devices.
 
file  xrt_results.h
 Internal result type for XRT.
 
file  xrt_settings.h
 Common settings structs to be transferred between different parts of Monadon.
 
file  xrt_tracking.h
 Header defining the tracking system integration in Monado.
 
file  xrt_vulkan_includes.h
 Include all of the Vulkan headers in one place.
 
file  xrt_windows.h
 A minimal way to include Windows.h.
 

Data Structures

struct  xrt_sub_image
 Specifies a sub-image in a layer. More...
 
struct  xrt_layer_projection_view_data
 All of the pure data values associated with a single view in a projection layer. More...
 
struct  xrt_layer_stereo_projection_data
 All the pure data values associated with a stereo projection layer. More...
 
struct  xrt_layer_depth_data
 All the pure data values associated with a depth information attached to a layer. More...
 
struct  xrt_layer_stereo_projection_depth_data
 All the pure data values associated with a stereo projection layer with depth swapchain attached. More...
 
struct  xrt_layer_quad_data
 All the pure data values associated with a quad layer. More...
 
struct  xrt_layer_cube_data
 All the pure data values associated with a cube layer. More...
 
struct  xrt_layer_cylinder_data
 All the pure data values associated with a cylinder layer. More...
 
struct  xrt_layer_equirect1_data
 All the pure data values associated with a equirect1 layer. More...
 
struct  xrt_layer_equirect2_data
 All the pure data values associated with a equirect2 layer. More...
 
struct  xrt_layer_data
 All the pure data values associated with a composition layer. More...
 
interface  xrt_swapchain
 Common swapchain interface/base. More...
 
struct  xrt_compositor_fence
 Compositor fence used for syncornization. More...
 
struct  xrt_compositor_event_state_change
 Session state changes event. More...
 
struct  xrt_compositor_event_overlay
 Primary session state changes event. More...
 
union  xrt_compositor_event
 Compositor events union. More...
 
struct  xrt_swapchain_create_info
 Swapchain creation info. More...
 
struct  xrt_session_info
 Session information, mostly overlay extension data. More...
 
struct  xrt_compositor_info
 Capabilities and information about the compositor and device together. More...
 
interface  xrt_compositor
 Common compositor client interface/base. More...
 
struct  xrt_swapchain_gl
 Base class for an OpenGL (ES) client swapchain. More...
 
struct  xrt_compositor_gl
 Base class for an OpenGL (ES) client compositor. More...
 
struct  xrt_swapchain_vk
 Base class for a Vulkan client swapchain. More...
 
struct  xrt_compositor_vk
 Base class for a Vulkan client compositor. More...
 
struct  xrt_image_native
 A single image of a swapchain based on native buffer handles. More...
 
interface  xrt_swapchain_native
 Base class for a swapchain that exposes a native buffer handle to be imported into a client API. More...
 
interface  xrt_compositor_native
 Main compositor server interface. More...
 
struct  xrt_system_compositor_info
 Capabilities and information about the system compositor and device together. More...
 
struct  xrt_multi_compositor_control
 Special functions to control multi session/clients. More...
 
struct  xrt_system_compositor
 The system compositor is a long lived object, it has the same life time as a XrSystemID. More...
 
struct  xrt_image_native_allocator
 Allocator for system native images, in general you do not need to free the images as they will be consumed by importing them to the graphics API. More...
 
struct  xrt_reference
 A base class for reference counted objects. More...
 
struct  xrt_quat
 A quaternion with single floats. More...
 
struct  xrt_vec1
 A 1 element vector with single floats. More...
 
struct  xrt_vec2
 A 2 element vector with single floats. More...
 
struct  xrt_vec3
 A 3 element vector with single floats. More...
 
struct  xrt_vec3_i32
 A 3 element vector with 32 bit integers. More...
 
struct  xrt_vec2_i32
 A 2 element vector with 32 bit integers. More...
 
struct  xrt_colour_rgb_u8
 A 3 element colour with 8 bits per channel. More...
 
struct  xrt_colour_rgba_u8
 A 4 element colour with 8 bits per channel. More...
 
struct  xrt_colour_rgb_f32
 A 3 element colour with floating point channels. More...
 
struct  xrt_colour_rgba_f32
 A 4 element colour with floating point channels. More...
 
struct  xrt_size
 Image size. More...
 
struct  xrt_offset
 Image offset. More...
 
struct  xrt_rect
 Image rectangle. More...
 
struct  xrt_pose
 A pose composed of a position and orientation. More...
 
struct  xrt_fov
 Describes a projection matrix fov. More...
 
struct  xrt_matrix_2x2
 A tightly packed 2x2 matrix of floats. More...
 
struct  xrt_matrix_3x3
 A tightly packed 3x3 matrix of floats. More...
 
struct  xrt_matrix_4x4
 A tightly packed 4x4 matrix of floats. More...
 
struct  xrt_api_requirements
 A range of API versions supported. More...
 
struct  xrt_space_relation
 A relation with two spaces, includes velocity and acceleration. More...
 
struct  xrt_space_graph
 A graph of space relations, technically more of a chain of transformation since it's not branching, but a flat graph is still a graph. More...
 
struct  xrt_hand_joint_value
 Location of a single hand joint. More...
 
struct  xrt_hand_joint_set
 Joint set type used for hand tracking. More...
 
union  xrt_input_value
 A union of all input types. More...
 
union  xrt_output_value
 A union of all output types. More...
 
struct  xrt_view
 A per-lens view information. More...
 
struct  xrt_hmd_parts
 All of the device components that deals with interfacing to a users head. More...
 
struct  xrt_input
 A single named input, that sits on a xrt_device. More...
 
struct  xrt_output
 A single named output, that sits on a xrt_device. More...
 
struct  xrt_binding_input_pair
 A binding pair, going from a binding point to a device input. More...
 
struct  xrt_binding_output_pair
 A binding pair, going from a binding point to a device output. More...
 
struct  xrt_binding_profile
 A binding profile, has lists of binding pairs to goes from device in name to the device it hangs off on. More...
 
struct  xrt_frame
 Basic frame data structure - holds a pointer to buffer. More...
 
struct  xrt_frame_context
 Object used to track all sinks and frame producers in a graph. More...
 
struct  xrt_fs_capture_parameters
 Controlling the camera capture parameters. More...
 
struct  xrt_fs_mode
 
struct  xrt_instance_info
 Information provided by the application at instance create time. More...
 
interface  xrt_instance
 This interface acts as a root object for Monado. More...
 
struct  xrt_prober_entry
 Entry for a single device. More...
 
struct  xrt_prober_entry_lists
 Main root of all of the probing device. More...
 
struct  xrt_prober_device
 A probed device, may or may not be opened. More...
 
struct  xrt_prober
 The main prober that probes and manages found but not opened HMD devices that are connected to the system. More...
 
struct  xrt_tracking_override
 
struct  xrt_settings_tracking
 Holding enough information to recreate a tracking pipeline. More...
 
struct  xrt_tracking_origin
 A tracking system or device origin. More...
 
interface  xrt_tracking_factory
 Tracking factory. More...
 
struct  xrt_tracking_sample
 IMU Sample. More...
 
interface  xrt_tracked_psmv
 A single tracked PS Move controller, camera and ball are not synced. More...
 
interface  xrt_tracked_psvr
 A tracked PSVR headset. More...
 
interface  xrt_tracked_hand
 A single tracked Hand. More...
 
interface  xrt_device
 A single HMD or input device. More...
 
interface  xrt_frame_sink
 A object that is sent frames. More...
 
interface  xrt_frame_node
 A interface object used for destroying a frame graph. More...
 
interface  xrt_fs
 Frameserver that generates frames. More...
 
interface  xrt_auto_prober
 An interface to be exposed by a device driver that should probe for the existence of its own device on the system, rather than using shared probers with vendor/product IDs, etc. More...
 

Macros

#define XRT_DEBUGBREAK()
 To trigger a trap/break in the debugger. More...
 
#define container_of(ptr, type, field)   (type *)((char *)ptr - offsetof(type, field))
 Get the holder from a pointer to a field. More...
 
#define XRT_MAX_SWAPCHAIN_IMAGES   8
 Max swapchain images, artificial limit. More...
 
#define XRT_MAX_SWAPCHAIN_FORMATS   16
 Max formats supported by a compositor, artificial limit. More...
 
#define XRT_SPACE_GRAPHS_MAX   8
 The maximum number of steps that can be in a space graph chain. More...
 
#define XRT_INPUT_NAME(id, type)   ((id << 8) | XRT_INPUT_TYPE_##type)
 Create an enum value for xrt_input_name that packs an ID and input type. More...
 
#define XRT_GET_INPUT_TYPE(name)   ((enum xrt_input_type)(name & 0xff))
 Extract the xrt_input_type from an xrt_input_name. More...
 
#define XRT_HAND_JOINT_COUNT   26
 Number of joints in a hand. More...
 
#define XRT_FINGER_COUNT   5
 Number of fingers on a hand. More...
 
#define XRT_MIN_HAPTIC_DURATION   -1
 Value used to indicate a haptic pulse of the minimal supported duration. More...
 
#define XRT_FREQUENCY_UNSPECIFIED   0
 Value used to indicate a haptic pulse of some runtime defined optimal frequency. More...
 
#define XRT_MAX_APPLICATION_NAME_SIZE   128
 
#define XRT_MAX_DEVICES_PER_PROBE   16
 The maximum number of devices that a single xrt_prober_entry::found or xrt_auto_prober::lelo_dallas_autoprobe function called by the prober can create per-call. More...
 
#define XRT_SETTINGS_CAMERA_NAME_LENGTH   256
 
#define XRT_SETTINGS_PATH_LENGTH   1024
 
#define XRT_MAX_TRACKING_OVERRIDES   16
 

Typedefs

typedef struct xrt_auto_prober *(* xrt_auto_prober_creator) ()
 Function for creating a auto prober. More...
 
typedef void(* xrt_prober_list_video_cb) (struct xrt_prober *xp, struct xrt_prober_device *pdev, const char *product, const char *manufacturer, const char *serial, void *ptr)
 Callback for listing video devices. More...
 

Enumerations

enum  xrt_swapchain_create_flags { XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT = (1 << 0), XRT_SWAPCHAIN_CREATE_STATIC_IMAGE = (1 << 1) }
 Special flags for creating swapchain images. More...
 
enum  xrt_swapchain_usage_bits {
  XRT_SWAPCHAIN_USAGE_COLOR = 0x00000001, XRT_SWAPCHAIN_USAGE_DEPTH_STENCIL = 0x00000002, XRT_SWAPCHAIN_USAGE_UNORDERED_ACCESS = 0x00000004, XRT_SWAPCHAIN_USAGE_TRANSFER_SRC = 0x00000008,
  XRT_SWAPCHAIN_USAGE_TRANSFER_DST = 0x00000010, XRT_SWAPCHAIN_USAGE_SAMPLED = 0x00000020, XRT_SWAPCHAIN_USAGE_MUTABLE_FORMAT = 0x00000040, XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT = 0x00000080
}
 Usage of the swapchain images. More...
 
enum  xrt_view_type { XRT_VIEW_TYPE_MONO = 1, XRT_VIEW_TYPE_STEREO = 2 }
 View type to be rendered to by the compositor. More...
 
enum  xrt_layer_type {
  XRT_LAYER_STEREO_PROJECTION, XRT_LAYER_STEREO_PROJECTION_DEPTH, XRT_LAYER_QUAD, XRT_LAYER_CUBE,
  XRT_LAYER_CYLINDER, XRT_LAYER_EQUIRECT1, XRT_LAYER_EQUIRECT2
}
 Layer type. More...
 
enum  xrt_layer_composition_flags { XRT_LAYER_COMPOSITION_CORRECT_CHROMATIC_ABERRATION_BIT = 1 << 0, XRT_LAYER_COMPOSITION_BLEND_TEXTURE_SOURCE_ALPHA_BIT = 1 << 1, XRT_LAYER_COMPOSITION_UNPREMULTIPLIED_ALPHA_BIT = 1 << 2, XRT_LAYER_COMPOSITION_VIEW_SPACE_BIT = 1 << 3 }
 Bit field for holding information about how a layer should be composited. More...
 
enum  xrt_layer_eye_visibility { XRT_LAYER_EYE_VISIBILITY_NONE = 0x0, XRT_LAYER_EYE_VISIBILITY_LEFT_BIT = 0x1, XRT_LAYER_EYE_VISIBILITY_RIGHT_BIT = 0x2, XRT_LAYER_EYE_VISIBILITY_BOTH = 0x3 }
 Which view is the layer visible to? More...
 
enum  xrt_compositor_event_type { XRT_COMPOSITOR_EVENT_NONE = 0, XRT_COMPOSITOR_EVENT_STATE_CHANGE = 1, XRT_COMPOSITOR_EVENT_OVERLAY_CHANGE = 2 }
 Event type for compositor events, none means no event was returned. More...
 
enum  xrt_compositor_frame_point { XRT_COMPOSITOR_FRAME_POINT_WOKE }
 
enum  xrt_blend_mode { XRT_BLEND_MODE_OPAQUE = 1, XRT_BLEND_MODE_ADDITIVE = 2, XRT_BLEND_MODE_ALPHA_BLEND = 3, XRT_BLEND_MODE_MAX_ENUM }
 Blend mode that the device supports, exact mirror of XrEnvironmentBlendMode. More...
 
enum  xrt_stereo_format { XRT_STEREO_FORMAT_NONE, XRT_STEREO_FORMAT_SBS, XRT_STEREO_FORMAT_INTERLEAVED, XRT_STEREO_FORMAT_OAU }
 What type of stereo format a frame has. More...
 
enum  xrt_space_relation_flags {
  XRT_SPACE_RELATION_ORIENTATION_VALID_BIT = (1 << 0), XRT_SPACE_RELATION_POSITION_VALID_BIT = (1 << 1), XRT_SPACE_RELATION_LINEAR_VELOCITY_VALID_BIT = (1 << 2), XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT = (1 << 3),
  XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT = (1 << 4), XRT_SPACE_RELATION_POSITION_TRACKED_BIT = (1 << 5), XRT_SPACE_RELATION_BITMASK_ALL, XRT_SPACE_RELATION_BITMASK_NONE = 0
}
 Flags of which components of a xrt_space_relation is valid. More...
 
enum  xrt_device_type {
  XRT_DEVICE_TYPE_UNKNOWN = 0, XRT_DEVICE_TYPE_HMD, XRT_DEVICE_TYPE_RIGHT_HAND_CONTROLLER, XRT_DEVICE_TYPE_LEFT_HAND_CONTROLLER,
  XRT_DEVICE_TYPE_ANY_HAND_CONTROLLER, XRT_DEVICE_TYPE_GENERIC_TRACKER, XRT_DEVICE_TYPE_HAND_TRACKER
}
 How an xrt_device can be used. More...
 
enum  xrt_input_type {
  XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE = 0x00, XRT_INPUT_TYPE_VEC1_MINUS_ONE_TO_ONE = 0x01, XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE = 0x02, XRT_INPUT_TYPE_VEC3_MINUS_ONE_TO_ONE = 0x03,
  XRT_INPUT_TYPE_BOOLEAN = 0x04, XRT_INPUT_TYPE_POSE = 0x05, XRT_INPUT_TYPE_HAND_TRACKING = 0x06
}
 Base type of this inputs. More...
 
enum  xrt_input_name {
  XRT_INPUT_GENERIC_HEAD_POSE = (( 0x0000 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_GENERIC_HEAD_DETECT = (( 0x0001 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_GENERIC_HAND_TRACKING_LEFT = (( 0x0002 << 8) | XRT_INPUT_TYPE_HAND_TRACKING ), XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT = (( 0x0004 << 8) | XRT_INPUT_TYPE_HAND_TRACKING ),
  XRT_INPUT_GENERIC_TRACKER_POSE = (( 0x0005 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_SIMPLE_SELECT_CLICK = (( 0x0010 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_SIMPLE_MENU_CLICK = (( 0x0011 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_SIMPLE_GRIP_POSE = (( 0x0012 << 8) | XRT_INPUT_TYPE_POSE ),
  XRT_INPUT_SIMPLE_AIM_POSE = (( 0x0013 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_PSMV_PS_CLICK = (( 0x0020 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_PSMV_MOVE_CLICK = (( 0x0021 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_PSMV_START_CLICK = (( 0x0022 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_PSMV_SELECT_CLICK = (( 0x0023 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_PSMV_SQUARE_CLICK = (( 0x0024 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_PSMV_CROSS_CLICK = (( 0x0025 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_PSMV_CIRCLE_CLICK = (( 0x0026 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_PSMV_TRIANGLE_CLICK = (( 0x0027 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_PSMV_TRIGGER_VALUE = (( 0x0028 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_PSMV_GRIP_POSE = (( 0x0029 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_PSMV_AIM_POSE = (( 0x002A << 8) | XRT_INPUT_TYPE_POSE ),
  XRT_INPUT_PSMV_BODY_CENTER_POSE = (( 0x002B << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_PSMV_BALL_CENTER_POSE = (( 0x002C << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_HYDRA_1_CLICK = (( 0x0030 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_HYDRA_2_CLICK = (( 0x0031 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_HYDRA_3_CLICK = (( 0x0032 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_HYDRA_4_CLICK = (( 0x0033 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_HYDRA_MIDDLE_CLICK = (( 0x0034 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_HYDRA_BUMPER_CLICK = (( 0x0035 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_HYDRA_JOYSTICK_CLICK = (( 0x0036 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_HYDRA_JOYSTICK_VALUE = (( 0x0037 << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_HYDRA_TRIGGER_VALUE = (( 0x0038 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_HYDRA_POSE = (( 0x0039 << 8) | XRT_INPUT_TYPE_POSE ),
  XRT_INPUT_DAYDREAM_TOUCHPAD_CLICK = (( 0x0040 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_DAYDREAM_BAR_CLICK = (( 0x0041 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_DAYDREAM_CIRCLE_CLICK = (( 0x0042 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_DAYDREAM_VOLUP_CLICK = (( 0x0043 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_DAYDREAM_VOLDN_CLICK = (( 0x0044 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_DAYDREAM_TOUCHPAD = (( 0x0045 << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_DAYDREAM_POSE = (( 0x0046 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_DAYDREAM_TOUCHPAD_TOUCH = (( 0x0047 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_INDEX_SYSTEM_CLICK = (( 0x0050 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_SYSTEM_TOUCH = (( 0x0051 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_A_CLICK = (( 0x0052 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_A_TOUCH = (( 0x0053 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_INDEX_B_CLICK = (( 0x0054 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_B_TOUCH = (( 0x0055 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_SQUEEZE_VALUE = (( 0x0056 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_INDEX_SQUEEZE_FORCE = (( 0x0057 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ),
  XRT_INPUT_INDEX_TRIGGER_CLICK = (( 0x0058 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_TRIGGER_VALUE = (( 0x0059 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_INDEX_TRIGGER_TOUCH = (( 0x005A << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_THUMBSTICK = (( 0x005B << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ),
  XRT_INPUT_INDEX_THUMBSTICK_CLICK = (( 0x005D << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_THUMBSTICK_TOUCH = (( 0x005E << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_TRACKPAD = (( 0x005F << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_INDEX_TRACKPAD_FORCE = (( 0x0061 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ),
  XRT_INPUT_INDEX_TRACKPAD_TOUCH = (( 0x0062 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_INDEX_GRIP_POSE = (( 0x0063 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_INDEX_AIM_POSE = (( 0x0064 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_VIVE_SYSTEM_CLICK = (( 0x0070 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_VIVE_SQUEEZE_CLICK = (( 0x0071 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_VIVE_MENU_CLICK = (( 0x0072 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_VIVE_TRIGGER_CLICK = (( 0x0073 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_VIVE_TRIGGER_VALUE = (( 0x0074 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ),
  XRT_INPUT_VIVE_TRACKPAD = (( 0x0075 << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_VIVE_TRACKPAD_CLICK = (( 0x0076 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_VIVE_TRACKPAD_TOUCH = (( 0x0077 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_VIVE_GRIP_POSE = (( 0x0078 << 8) | XRT_INPUT_TYPE_POSE ),
  XRT_INPUT_VIVE_AIM_POSE = (( 0x0079 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_VIVEPRO_SYSTEM_CLICK = (( 0x0080 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_VIVEPRO_VOLUP_CLICK = (( 0x0081 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_VIVEPRO_VOLDN_CLICK = (( 0x0082 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_VIVEPRO_MUTE_MIC_CLICK = (( 0x0083 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_WMR_MENU_CLICK = (( 0x0090 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_WMR_SQUEEZE_CLICK = (( 0x0091 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_WMR_TRIGGER_VALUE = (( 0x0092 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ),
  XRT_INPUT_WMR_THUMBSTICK_CLICK = (( 0x0093 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_WMR_THUMBSTICK = (( 0x0094 << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_WMR_TRACKPAD_CLICK = (( 0x0095 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_WMR_TRACKPAD_TOUCH = (( 0x0096 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_WMR_TRACKPAD = (( 0x0097 << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_WMR_GRIP_POSE = (( 0x0098 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_WMR_AIM_POSE = (( 0x0099 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_XBOX_MENU_CLICK = (( 0x00A0 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_XBOX_VIEW_CLICK = (( 0x00A1 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_A_CLICK = (( 0x00A2 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_B_CLICK = (( 0x00A3 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_X_CLICK = (( 0x00A4 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_XBOX_Y_CLICK = (( 0x00A5 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_DPAD_DOWN_CLICK = (( 0x00A6 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_DPAD_RIGHT_CLICK = (( 0x00A7 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_DPAD_UP_CLICK = (( 0x00A8 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_XBOX_DPAD_LEFT_CLICK = (( 0x00A9 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_SHOULDER_LEFT_CLICK = (( 0x00AA << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_SHOULDER_RIGHT_CLICK = (( 0x00AB << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_THUMBSTICK_LEFT_CLICK = (( 0x00AC << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_XBOX_THUMBSTICK_LEFT = (( 0x00AD << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_XBOX_THUMBSTICK_RIGHT_CLICK = (( 0x00AE << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_XBOX_THUMBSTICK_RIGHT = (( 0x00AF << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_XBOX_LEFT_TRIGGER_VALUE = (( 0x00B0 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ),
  XRT_INPUT_XBOX_RIGHT_TRIGGER_VALUE = (( 0x00B1 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_GO_SYSTEM_CLICK = (( 0x00B0 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_GO_TRIGGER_CLICK = (( 0x00B1 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_GO_BACK_CLICK = (( 0x00B2 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_GO_TRACKPAD_CLICK = (( 0x00B3 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_GO_TRACKPAD_TOUCH = (( 0x00B4 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_GO_TRACKPAD = (( 0x00B5 << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_GO_GRIP_POSE = (( 0x00B6 << 8) | XRT_INPUT_TYPE_POSE ),
  XRT_INPUT_GO_AIM_POSE = (( 0x00B7 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_TOUCH_X_CLICK = (( 0x00C0 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_X_TOUCH = (( 0x00C1 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_Y_CLICK = (( 0x00C2 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_TOUCH_Y_TOUCH = (( 0x00C3 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_MENU_CLICK = (( 0x00C4 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_A_CLICK = (( 0x00C5 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_A_TOUCH = (( 0x00C6 << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_TOUCH_B_CLICK = (( 0x00C7 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_B_TOUCH = (( 0x00C8 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_SYSTEM_CLICK = (( 0x00C9 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_SQUEEZE_VALUE = (( 0x00CA << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ),
  XRT_INPUT_TOUCH_TRIGGER_TOUCH = (( 0x00CB << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_TRIGGER_VALUE = (( 0x00CC << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_TOUCH_THUMBSTICK_CLICK = (( 0x00CD << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_THUMBSTICK_TOUCH = (( 0x00CE << 8) | XRT_INPUT_TYPE_BOOLEAN ),
  XRT_INPUT_TOUCH_THUMBSTICK = (( 0x00CF << 8) | XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE ), XRT_INPUT_TOUCH_THUMBREST_TOUCH = (( 0x00D0 << 8) | XRT_INPUT_TYPE_BOOLEAN ), XRT_INPUT_TOUCH_GRIP_POSE = (( 0x00D1 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_TOUCH_AIM_POSE = (( 0x00D2 << 8) | XRT_INPUT_TYPE_POSE ),
  XRT_INPUT_HAND_SELECT_VALUE = (( 0x00E0 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_HAND_SQUEEZE_VALUE = (( 0x00E1 << 8) | XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE ), XRT_INPUT_HAND_GRIP_POSE = (( 0x00E2 << 8) | XRT_INPUT_TYPE_POSE ), XRT_INPUT_HAND_AIM_POSE = (( 0x00E3 << 8) | XRT_INPUT_TYPE_POSE )
}
 Every internal input source known to monado with a baked in type. More...
 
enum  xrt_hand_joint {
  XRT_HAND_JOINT_PALM = 0, XRT_HAND_JOINT_WRIST = 1, XRT_HAND_JOINT_THUMB_METACARPAL = 2, XRT_HAND_JOINT_THUMB_PROXIMAL = 3,
  XRT_HAND_JOINT_THUMB_DISTAL = 4, XRT_HAND_JOINT_THUMB_TIP = 5, XRT_HAND_JOINT_INDEX_METACARPAL = 6, XRT_HAND_JOINT_INDEX_PROXIMAL = 7,
  XRT_HAND_JOINT_INDEX_INTERMEDIATE = 8, XRT_HAND_JOINT_INDEX_DISTAL = 9, XRT_HAND_JOINT_INDEX_TIP = 10, XRT_HAND_JOINT_MIDDLE_METACARPAL = 11,
  XRT_HAND_JOINT_MIDDLE_PROXIMAL = 12, XRT_HAND_JOINT_MIDDLE_INTERMEDIATE = 13, XRT_HAND_JOINT_MIDDLE_DISTAL = 14, XRT_HAND_JOINT_MIDDLE_TIP = 15,
  XRT_HAND_JOINT_RING_METACARPAL = 16, XRT_HAND_JOINT_RING_PROXIMAL = 17, XRT_HAND_JOINT_RING_INTERMEDIATE = 18, XRT_HAND_JOINT_RING_DISTAL = 19,
  XRT_HAND_JOINT_RING_TIP = 20, XRT_HAND_JOINT_LITTLE_METACARPAL = 21, XRT_HAND_JOINT_LITTLE_PROXIMAL = 22, XRT_HAND_JOINT_LITTLE_INTERMEDIATE = 23,
  XRT_HAND_JOINT_LITTLE_DISTAL = 24, XRT_HAND_JOINT_LITTLE_TIP = 25, XRT_HAND_JOINT_MAX_ENUM = 0x7FFFFFFF
}
 Number of joints in a hand. More...
 
enum  xrt_hand { XRT_HAND_LEFT = 0, XRT_HAND_RIGHT = 1 }
 Enumeration for left and right hand. More...
 
enum  xrt_finger {
  XRT_FINGER_LITTLE = 0, XRT_FINGER_RING, XRT_FINGER_MIDDLE, XRT_FINGER_INDEX,
  XRT_FINGER_THUMB
}
 Names for fingers on a hand. More...
 
enum  xrt_output_type { XRT_OUTPUT_TYPE_VIBRATION = 0x00 }
 Base type of this output. More...
 
enum  xrt_output_name {
  XRT_OUTPUT_NAME_SIMPLE_VIBRATION = (( 0x0010 << 8) | XRT_OUTPUT_TYPE_VIBRATION ), XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION = (( 0x0020 << 8) | XRT_OUTPUT_TYPE_VIBRATION ), XRT_OUTPUT_NAME_INDEX_HAPTIC = (( 0x0030 << 8) | XRT_OUTPUT_TYPE_VIBRATION ), XRT_OUTPUT_NAME_VIVE_HAPTIC = (( 0x0040 << 8) | XRT_OUTPUT_TYPE_VIBRATION ),
  XRT_OUTPUT_NAME_WMR_HAPTIC = (( 0x0050 << 8) | XRT_OUTPUT_TYPE_VIBRATION ), XRT_OUTPUT_NAME_XBOX_HAPTIC_LEFT = (( 0x0060 << 8) | XRT_OUTPUT_TYPE_VIBRATION ), XRT_OUTPUT_NAME_XBOX_HAPTIC_RIGHTT = (( 0x0061 << 8) | XRT_OUTPUT_TYPE_VIBRATION ), XRT_OUTPUT_NAME_XBOX_HAPTIC_LEFT_TRIGGER = (( 0x0062 << 8) | XRT_OUTPUT_TYPE_VIBRATION ),
  XRT_OUTPUT_NAME_XBOX_HAPTIC_RIGHT_TRIGGER = (( 0x0063 << 8) | XRT_OUTPUT_TYPE_VIBRATION ), XRT_OUTPUT_NAME_TOUCH_HAPTIC = (( 0x0070 << 8) | XRT_OUTPUT_TYPE_VIBRATION )
}
 Name of a output with a baked in type. More...
 
enum  xrt_fs_capture_type { XRT_FS_CAPTURE_TYPE_TRACKING = 0, XRT_FS_CAPTURE_TYPE_CALIBRATION = 1 }
 Enum describing which type of capture we are doing. More...
 
enum  xrt_settings_camera_type { XRT_SETTINGS_CAMERA_TYPE_REGULAR_MONO = 0, XRT_SETTINGS_CAMERA_TYPE_REGULAR_SBS = 1, XRT_SETTINGS_CAMERA_TYPE_PS4 = 2, XRT_SETTINGS_CAMERA_TYPE_LEAP_MOTION = 3 }
 Camera type. More...
 
enum  xrt_tracking_override_type { XRT_TRACKING_OVERRIDE_DIRECT = 0, XRT_TRACKING_OVERRIDE_ATTACHED }
 
enum  xrt_tracking_type {
  XRT_TRACKING_TYPE_NONE, XRT_TRACKING_TYPE_RGB, XRT_TRACKING_TYPE_LIGHTHOUSE, XRT_TRACKING_TYPE_HYDRA,
  XRT_TRACKING_TYPE_EXTERNAL_SLAM, XRT_TRACKING_TYPE_OTHER
}
 What kind of tracking system is this. More...
 

Functions

void xrt_gfx_gl_get_versions (struct xrt_api_requirements *ver)
 
void xrt_gfx_gles_get_versions (struct xrt_api_requirements *ver)
 
void xrt_gfx_vk_get_versions (struct xrt_api_requirements *ver)
 
static void xrt_swapchain_reference (struct xrt_swapchain **dst, struct xrt_swapchain *src)
 Update the reference counts on swapchain(s). More...
 
static xrt_result_t xrt_swapchain::xrt_swapchain_acquire_image (struct xrt_swapchain *xsc, uint32_t *out_index)
 Obtain the index of the next image to use, without blocking on being able to write to it. More...
 
static xrt_result_t xrt_swapchain::xrt_swapchain_wait_image (struct xrt_swapchain *xsc, uint64_t timeout, uint32_t index)
 See xrWaitSwapchainImage, state tracker needs to track index. More...
 
static xrt_result_t xrt_swapchain::xrt_swapchain_release_image (struct xrt_swapchain *xsc, uint32_t index)
 See xrReleaseSwapchainImage, state tracker needs to track index. More...
 
static xrt_result_t xrt_compositor_fence::xrt_compositor_fence_wait (struct xrt_compositor_fence *xcf, uint64_t timeout)
 Destroys the fence. More...
 
static void xrt_compositor_fence::xrt_compositor_fence_destroy (struct xrt_compositor_fence **xcf_ptr)
 Destroys the fence. More...
 
static xrt_result_t xrt_compositor::xrt_comp_create_swapchain (struct xrt_compositor *xc, const struct xrt_swapchain_create_info *info, struct xrt_swapchain **out_xsc)
 Create a swapchain with a set of images. More...
 
static xrt_result_t xrt_compositor::xrt_comp_import_swapchain (struct xrt_compositor *xc, const struct xrt_swapchain_create_info *info, struct xrt_image_native *native_images, uint32_t num_images, struct xrt_swapchain **out_xsc)
 Create a swapchain from a set of native images. More...
 
static xrt_result_t xrt_compositor::xrt_comp_import_fence (struct xrt_compositor *xc, xrt_graphics_sync_handle_t handle, struct xrt_compositor_fence **out_xcf)
 Create a compositor fence from a native sync handle. More...
 
static xrt_result_t xrt_compositor::xrt_comp_poll_events (struct xrt_compositor *xc, union xrt_compositor_event *out_xce)
 Poll events from this compositor. More...
 
static xrt_result_t xrt_compositor::xrt_comp_begin_session (struct xrt_compositor *xc, enum xrt_view_type view_type)
 See xrBeginSession. More...
 
static xrt_result_t xrt_compositor::xrt_comp_end_session (struct xrt_compositor *xc)
 See xrEndSession, unlike the OpenXR one the state tracker is responsible to call discard frame before calling this function. More...
 
static xrt_result_t xrt_compositor::xrt_comp_predict_frame (struct xrt_compositor *xc, int64_t *out_frame_id, uint64_t *out_wake_time_ns, uint64_t *out_predicted_gpu_time_ns, uint64_t *out_predicted_display_time_ns, uint64_t *out_predicted_display_period_ns)
 This function and mark_frame function calls are a alternative to wait_frame. More...
 
static xrt_result_t xrt_compositor::xrt_comp_mark_frame (struct xrt_compositor *xc, int64_t frame_id, enum xrt_compositor_frame_point point, uint64_t when_ns)
 This function and predict_frame function calls are a alternative to wait_frame. More...
 
static xrt_result_t xrt_compositor::xrt_comp_wait_frame (struct xrt_compositor *xc, int64_t *out_frame_id, uint64_t *predicted_display_time, uint64_t *predicted_display_period)
 See xrWaitFrame. More...
 
static xrt_result_t xrt_compositor::xrt_comp_begin_frame (struct xrt_compositor *xc, int64_t frame_id)
 See xrBeginFrame. More...
 
static xrt_result_t xrt_compositor::xrt_comp_discard_frame (struct xrt_compositor *xc, int64_t frame_id)
 This isn't in the OpenXR API but is explicit in the XRT interfaces. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_begin (struct xrt_compositor *xc, int64_t frame_id, uint64_t display_time_ns, enum xrt_blend_mode env_blend_mode)
 Begins layer submission, this and the other layer_* calls are equivalent to xrEndFrame, except over multiple calls. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_stereo_projection (struct xrt_compositor *xc, struct xrt_device *xdev, struct xrt_swapchain *l_xsc, struct xrt_swapchain *r_xsc, const struct xrt_layer_data *data)
 Adds a stereo projection layer for submissions. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_stereo_projection_depth (struct xrt_compositor *xc, struct xrt_device *xdev, struct xrt_swapchain *l_xsc, struct xrt_swapchain *r_xsc, struct xrt_swapchain *l_d_xsc, struct xrt_swapchain *r_d_xsc, const struct xrt_layer_data *data)
 Adds a stereo projection layer for submission, has depth information. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_quad (struct xrt_compositor *xc, struct xrt_device *xdev, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Adds a quad layer for submission, the center of the quad is specified by the pose and extends outwards from it. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_cube (struct xrt_compositor *xc, struct xrt_device *xdev, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Adds a cube layer for submission. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_cylinder (struct xrt_compositor *xc, struct xrt_device *xdev, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Adds a cylinder layer for submission. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_equirect1 (struct xrt_compositor *xc, struct xrt_device *xdev, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Adds a equirect1 layer for submission. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_equirect2 (struct xrt_compositor *xc, struct xrt_device *xdev, struct xrt_swapchain *xsc, const struct xrt_layer_data *data)
 Adds a equirect2 layer for submission. More...
 
static xrt_result_t xrt_compositor::xrt_comp_layer_commit (struct xrt_compositor *xc, int64_t frame_id, xrt_graphics_sync_handle_t sync_handle)
 Commits all of the submitted layers, it's from this on that the compositor will use the layers. More...
 
static void xrt_compositor::xrt_comp_destroy (struct xrt_compositor **xc_ptr)
 Teardown the compositor. More...
 
static void xrt_swapchain_native_reference (struct xrt_swapchain_native **dst, struct xrt_swapchain_native *src)
 Update the reference counts on swapchain(s). More...
 
static xrt_result_t xrt_compositor_native::xrt_comp_native_create_swapchain (struct xrt_compositor_native *xcn, const struct xrt_swapchain_create_info *info, struct xrt_swapchain_native **out_xscn)
 Create a native swapchain with a set of images. More...
 
static void xrt_compositor_native::xrt_comp_native_destroy (struct xrt_compositor_native **xcn_ptr)
 Teardown the compositor. More...
 
static xrt_result_t xrt_system_compositor::xrt_syscomp_set_state (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, bool visible, bool focused)
 Sets the state of the compositor, generating any events to the client if the state is actually changed. More...
 
static xrt_result_t xrt_system_compositor::xrt_syscomp_set_z_order (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, int64_t z_order)
 Set the rendering Z order for rendering, visible has higher priority then z_order but is still saved until visible again. More...
 
static xrt_result_t xrt_system_compositor::xrt_syscomp_set_main_app_visibility (struct xrt_system_compositor *xsc, struct xrt_compositor *xc, bool visible)
 Tell this client/session if the main application is visible or not. More...
 
static xrt_result_t xrt_system_compositor::xrt_syscomp_create_native_compositor (struct xrt_system_compositor *xsc, const struct xrt_session_info *xsi, struct xrt_compositor_native **out_xcn)
 Create a new native compositor. More...
 
static void xrt_system_compositor::xrt_syscomp_destroy (struct xrt_system_compositor **xsc_ptr)
 Teardown the system compositor. More...
 
static void xrt_image_native_allocator::xrt_images_destroy (struct xrt_image_native_allocator **xina_ptr)
 Destroy the image allocator. More...
 
static void xrt_frame_reference (struct xrt_frame **dst, struct xrt_frame *src)
 Update the reference counts on frame(s). More...
 
xrt_result_t xrt_compositor_native::xrt_gfx_provider_create_gl_egl (struct xrt_compositor_native *xcn, EGLDisplay display, EGLConfig config, EGLContext context, PFNEGLGETPROCADDRESSPROC getProcAddress, struct xrt_compositor_gl **out_xcgl)
 Create an OpenGL(ES) compositor client using EGL. More...
 
xrt_result_t xrt_gfx_provider_create_system (struct xrt_device *xdev, struct xrt_system_compositor **out_xsysc)
 Creates the main system compositor. More...
 
struct xrt_compositor_vkxrt_compositor_native::xrt_gfx_vk_provider_create (struct xrt_compositor_native *xcn, VkInstance instance, PFN_vkGetInstanceProcAddr get_instance_proc_addr, VkPhysicalDevice physical_device, VkDevice device, uint32_t queue_family_index, uint32_t queue_index)
 Create a Vulkan compositor client. More...
 
struct xrt_compositor_glxrt_compositor_native::xrt_gfx_provider_create_gl_xlib (struct xrt_compositor_native *xcn, Display *xDisplay, uint32_t visualid, GLXFBConfig glxFBConfig, GLXDrawable glxDrawable, GLXContext glxContext)
 Create an OpenGL compositor client using xlib. More...
 
static int xrt_instance::xrt_instance_select (struct xrt_instance *xinst, struct xrt_device **xdevs, size_t num_xdevs)
 Returns the devices of the system represented as xrt_device. More...
 
static int xrt_instance::xrt_instance_create_system_compositor (struct xrt_instance *xinst, struct xrt_device *xdev, struct xrt_system_compositor **out_xsc)
 Creates a xrt_system_compositor. More...
 
static int xrt_instance::xrt_instance_get_prober (struct xrt_instance *xinst, struct xrt_prober **out_xp)
 Get the instance xrt_prober, if any. More...
 
static void xrt_instance::xrt_instance_destroy (struct xrt_instance **xinst_ptr)
 Destroy an xrt_instance - helper function. More...
 
static void xrt_tracked_psmv::xrt_tracked_psmv_get_tracked_pose (struct xrt_tracked_psmv *psmv, enum xrt_input_name name, timepoint_ns when_ns, struct xrt_space_relation *out_relation)
 
static void xrt_tracked_psmv::xrt_tracked_psmv_push_imu (struct xrt_tracked_psmv *psmv, timepoint_ns timestamp_ns, struct xrt_tracking_sample *sample)
 
static void xrt_tracked_psmv::xrt_tracked_psmv_destroy (struct xrt_tracked_psmv **xtmv_ptr)
 
static void xrt_tracked_psmv::xrt_tracked_psvr_get_tracked_pose (struct xrt_tracked_psvr *psvr, timepoint_ns when_ns, struct xrt_space_relation *out_relation)
 
static void xrt_tracked_psmv::xrt_tracked_psvr_push_imu (struct xrt_tracked_psvr *psvr, timepoint_ns timestamp_ns, struct xrt_tracking_sample *sample)
 
static void xrt_tracked_psmv::xrt_tracked_psvr_destroy (struct xrt_tracked_psvr **xtvr_ptr)
 
static void xrt_tracked_hand::xrt_tracked_hand_get_joints (struct xrt_tracked_hand *h, enum xrt_input_name name, timepoint_ns when_ns, struct u_hand_joint_default_set *out_joints, struct xrt_space_relation *out_relation)
 

Variables

const char * xrt_gfx_vk_instance_extensions
 A space-delimited string of Vulkan instance extensions required from a client. More...
 
const char * xrt_gfx_vk_device_extensions
 A space-delimited string of Vulkan device extensions required from a client. More...
 

Factory

Implemented in each target.

int xrt_instance_create (struct xrt_instance_info *ii, struct xrt_instance **out_xinst)
 Create an implementation of the xrt_instance interface. More...
 

Detailed Description

The main interface shared between the different components of Monado.

Macro Definition Documentation

◆ container_of

#define container_of (   ptr,
  type,
  field 
)    (type *)((char *)ptr - offsetof(type, field))

◆ XRT_DEBUGBREAK

#define XRT_DEBUGBREAK ( )

#include <xrt/xrt_compiler.h>

To trigger a trap/break in the debugger.

Referenced by oxr_error().

◆ XRT_FINGER_COUNT

#define XRT_FINGER_COUNT   5

#include <xrt/xrt_defines.h>

Number of fingers on a hand.

◆ XRT_FREQUENCY_UNSPECIFIED

#define XRT_FREQUENCY_UNSPECIFIED   0

#include <xrt/xrt_defines.h>

Value used to indicate a haptic pulse of some runtime defined optimal frequency.

Referenced by survive_controller_haptic_pulse(), and vive_controller_haptic_pulse().

◆ XRT_GET_INPUT_TYPE

#define XRT_GET_INPUT_TYPE (   name)    ((enum xrt_input_type)(name & 0xff))

#include <xrt/xrt_defines.h>

Extract the xrt_input_type from an xrt_input_name.

Parameters
nameA xrt_input_name value
Returns
xrt_input_type

Referenced by add_one(), CDeviceDriver_Monado_Controller::AddControl(), CDeviceDriver_Monado_Controller::AddMonadoInput(), oxr_action_bind_io(), oxr_input_combine_input(), and scene_render().

◆ XRT_HAND_JOINT_COUNT

#define XRT_HAND_JOINT_COUNT   26

#include <xrt/xrt_defines.h>

Number of joints in a hand.

Corresponds to XR_HAND_JOINT_COUNT_EXT.

See also
xrt_hand_joint

Referenced by u_hand_joints_set_out_data().

◆ XRT_INPUT_NAME

#define XRT_INPUT_NAME (   id,
  type 
)    ((id << 8) | XRT_INPUT_TYPE_##type)

#include <xrt/xrt_defines.h>

Create an enum value for xrt_input_name that packs an ID and input type.

Parameters
idan integer
typeThe suffix of an xrt_input_type value name: XRT_INPUT_TYPE_ is prepended automatically.
See also
xrt_input_name

◆ XRT_MAX_APPLICATION_NAME_SIZE

#define XRT_MAX_APPLICATION_NAME_SIZE   128

#include <xrt/xrt_instance.h>

◆ XRT_MAX_DEVICES_PER_PROBE

#define XRT_MAX_DEVICES_PER_PROBE   16

#include <xrt/xrt_prober.h>

The maximum number of devices that a single xrt_prober_entry::found or xrt_auto_prober::lelo_dallas_autoprobe function called by the prober can create per-call.

Referenced by add_from_auto_probers(), add_from_devices(), oh_device_create(), oh_device_destroy(), and survive_device_autoprobe().

◆ XRT_MAX_SWAPCHAIN_FORMATS

#define XRT_MAX_SWAPCHAIN_FORMATS   16

#include <xrt/xrt_compositor.h>

Max formats supported by a compositor, artificial limit.

Referenced by oxr_session_enumerate_formats(), and xrt_gfx_provider_create_system().

◆ XRT_MAX_SWAPCHAIN_IMAGES

#define XRT_MAX_SWAPCHAIN_IMAGES   8

#include <xrt/xrt_compositor.h>

Max swapchain images, artificial limit.

◆ XRT_MAX_TRACKING_OVERRIDES

#define XRT_MAX_TRACKING_OVERRIDES   16

#include <xrt/xrt_settings.h>

Referenced by scene_render().

◆ XRT_MIN_HAPTIC_DURATION

#define XRT_MIN_HAPTIC_DURATION   -1

#include <xrt/xrt_defines.h>

Value used to indicate a haptic pulse of the minimal supported duration.

Referenced by CServerDriver_Monado::HandleHapticEvent(), survive_controller_haptic_pulse(), and vive_controller_haptic_pulse().

◆ XRT_SETTINGS_CAMERA_NAME_LENGTH

#define XRT_SETTINGS_CAMERA_NAME_LENGTH   256

#include <xrt/xrt_settings.h>

◆ XRT_SETTINGS_PATH_LENGTH

#define XRT_SETTINGS_PATH_LENGTH   1024

#include <xrt/xrt_settings.h>

◆ XRT_SPACE_GRAPHS_MAX

#define XRT_SPACE_GRAPHS_MAX   8

#include <xrt/xrt_defines.h>

The maximum number of steps that can be in a space graph chain.

See also
xrt_space_graph::steps

Referenced by m_space_graph_add_relation(), and m_space_graph_reserve().

Typedef Documentation

◆ xrt_auto_prober_creator

typedef struct xrt_auto_prober*(* xrt_auto_prober_creator) ()

#include <xrt/xrt_prober.h>

Function for creating a auto prober.

◆ xrt_prober_list_video_cb

typedef void(* xrt_prober_list_video_cb) (struct xrt_prober *xp, struct xrt_prober_device *pdev, const char *product, const char *manufacturer, const char *serial, void *ptr)

#include <xrt/xrt_prober.h>

Callback for listing video devices.

Enumeration Type Documentation

◆ xrt_blend_mode

#include <xrt/xrt_defines.h>

Blend mode that the device supports, exact mirror of XrEnvironmentBlendMode.

Enumerator
XRT_BLEND_MODE_OPAQUE 
XRT_BLEND_MODE_ADDITIVE 
XRT_BLEND_MODE_ALPHA_BLEND 
XRT_BLEND_MODE_MAX_ENUM 

◆ xrt_compositor_event_type

#include <xrt/xrt_compositor.h>

Event type for compositor events, none means no event was returned.

Enumerator
XRT_COMPOSITOR_EVENT_NONE 
XRT_COMPOSITOR_EVENT_STATE_CHANGE 
XRT_COMPOSITOR_EVENT_OVERLAY_CHANGE 

◆ xrt_compositor_frame_point

#include <xrt/xrt_compositor.h>

Enumerator
XRT_COMPOSITOR_FRAME_POINT_WOKE 

The client woke up after waiting.

◆ xrt_device_type

#include <xrt/xrt_defines.h>

How an xrt_device can be used.

Enumerator
XRT_DEVICE_TYPE_UNKNOWN 
XRT_DEVICE_TYPE_HMD 
XRT_DEVICE_TYPE_RIGHT_HAND_CONTROLLER 
XRT_DEVICE_TYPE_LEFT_HAND_CONTROLLER 
XRT_DEVICE_TYPE_ANY_HAND_CONTROLLER 
XRT_DEVICE_TYPE_GENERIC_TRACKER 
XRT_DEVICE_TYPE_HAND_TRACKER 

◆ xrt_finger

enum xrt_finger

#include <xrt/xrt_defines.h>

Names for fingers on a hand.

Enumerator
XRT_FINGER_LITTLE 
XRT_FINGER_RING 
XRT_FINGER_MIDDLE 
XRT_FINGER_INDEX 
XRT_FINGER_THUMB 

◆ xrt_fs_capture_type

#include <xrt/xrt_frameserver.h>

Enum describing which type of capture we are doing.

See also
xrt_fs
Enumerator
XRT_FS_CAPTURE_TYPE_TRACKING 
XRT_FS_CAPTURE_TYPE_CALIBRATION 

◆ xrt_hand

enum xrt_hand

#include <xrt/xrt_defines.h>

Enumeration for left and right hand.

Enumerator
XRT_HAND_LEFT 
XRT_HAND_RIGHT 

◆ xrt_hand_joint

#include <xrt/xrt_defines.h>

Number of joints in a hand.

Corresponds to XrHandJointEXT.

Enumerator
XRT_HAND_JOINT_PALM 
XRT_HAND_JOINT_WRIST 
XRT_HAND_JOINT_THUMB_METACARPAL 
XRT_HAND_JOINT_THUMB_PROXIMAL 
XRT_HAND_JOINT_THUMB_DISTAL 
XRT_HAND_JOINT_THUMB_TIP 
XRT_HAND_JOINT_INDEX_METACARPAL 
XRT_HAND_JOINT_INDEX_PROXIMAL 
XRT_HAND_JOINT_INDEX_INTERMEDIATE 
XRT_HAND_JOINT_INDEX_DISTAL 
XRT_HAND_JOINT_INDEX_TIP 
XRT_HAND_JOINT_MIDDLE_METACARPAL 
XRT_HAND_JOINT_MIDDLE_PROXIMAL 
XRT_HAND_JOINT_MIDDLE_INTERMEDIATE 
XRT_HAND_JOINT_MIDDLE_DISTAL 
XRT_HAND_JOINT_MIDDLE_TIP 
XRT_HAND_JOINT_RING_METACARPAL 
XRT_HAND_JOINT_RING_PROXIMAL 
XRT_HAND_JOINT_RING_INTERMEDIATE 
XRT_HAND_JOINT_RING_DISTAL 
XRT_HAND_JOINT_RING_TIP 
XRT_HAND_JOINT_LITTLE_METACARPAL 
XRT_HAND_JOINT_LITTLE_PROXIMAL 
XRT_HAND_JOINT_LITTLE_INTERMEDIATE 
XRT_HAND_JOINT_LITTLE_DISTAL 
XRT_HAND_JOINT_LITTLE_TIP 
XRT_HAND_JOINT_MAX_ENUM 

◆ xrt_input_name

#include <xrt/xrt_defines.h>

Every internal input source known to monado with a baked in type.

See also
xrt_input_type
Enumerator
XRT_INPUT_GENERIC_HEAD_POSE 
XRT_INPUT_GENERIC_HEAD_DETECT 
XRT_INPUT_GENERIC_HAND_TRACKING_LEFT 
XRT_INPUT_GENERIC_HAND_TRACKING_RIGHT 
XRT_INPUT_GENERIC_TRACKER_POSE 
XRT_INPUT_SIMPLE_SELECT_CLICK 
XRT_INPUT_SIMPLE_MENU_CLICK 
XRT_INPUT_SIMPLE_GRIP_POSE 
XRT_INPUT_SIMPLE_AIM_POSE 
XRT_INPUT_PSMV_PS_CLICK 
XRT_INPUT_PSMV_MOVE_CLICK 
XRT_INPUT_PSMV_START_CLICK 
XRT_INPUT_PSMV_SELECT_CLICK 
XRT_INPUT_PSMV_SQUARE_CLICK 
XRT_INPUT_PSMV_CROSS_CLICK 
XRT_INPUT_PSMV_CIRCLE_CLICK 
XRT_INPUT_PSMV_TRIANGLE_CLICK 
XRT_INPUT_PSMV_TRIGGER_VALUE 
XRT_INPUT_PSMV_GRIP_POSE 
XRT_INPUT_PSMV_AIM_POSE 
XRT_INPUT_PSMV_BODY_CENTER_POSE 
XRT_INPUT_PSMV_BALL_CENTER_POSE 
XRT_INPUT_HYDRA_1_CLICK 
XRT_INPUT_HYDRA_2_CLICK 
XRT_INPUT_HYDRA_3_CLICK 
XRT_INPUT_HYDRA_4_CLICK 
XRT_INPUT_HYDRA_MIDDLE_CLICK 
XRT_INPUT_HYDRA_BUMPER_CLICK 
XRT_INPUT_HYDRA_JOYSTICK_CLICK 
XRT_INPUT_HYDRA_JOYSTICK_VALUE 
XRT_INPUT_HYDRA_TRIGGER_VALUE 
XRT_INPUT_HYDRA_POSE 
XRT_INPUT_DAYDREAM_TOUCHPAD_CLICK 
XRT_INPUT_DAYDREAM_BAR_CLICK 
XRT_INPUT_DAYDREAM_CIRCLE_CLICK 
XRT_INPUT_DAYDREAM_VOLUP_CLICK 
XRT_INPUT_DAYDREAM_VOLDN_CLICK 
XRT_INPUT_DAYDREAM_TOUCHPAD 
XRT_INPUT_DAYDREAM_POSE 
XRT_INPUT_DAYDREAM_TOUCHPAD_TOUCH 
XRT_INPUT_INDEX_SYSTEM_CLICK 
XRT_INPUT_INDEX_SYSTEM_TOUCH 
XRT_INPUT_INDEX_A_CLICK 
XRT_INPUT_INDEX_A_TOUCH 
XRT_INPUT_INDEX_B_CLICK 
XRT_INPUT_INDEX_B_TOUCH 
XRT_INPUT_INDEX_SQUEEZE_VALUE 
XRT_INPUT_INDEX_SQUEEZE_FORCE 
XRT_INPUT_INDEX_TRIGGER_CLICK 
XRT_INPUT_INDEX_TRIGGER_VALUE 
XRT_INPUT_INDEX_TRIGGER_TOUCH 
XRT_INPUT_INDEX_THUMBSTICK 
XRT_INPUT_INDEX_THUMBSTICK_CLICK 
XRT_INPUT_INDEX_THUMBSTICK_TOUCH 
XRT_INPUT_INDEX_TRACKPAD 
XRT_INPUT_INDEX_TRACKPAD_FORCE 
XRT_INPUT_INDEX_TRACKPAD_TOUCH 
XRT_INPUT_INDEX_GRIP_POSE 
XRT_INPUT_INDEX_AIM_POSE 
XRT_INPUT_VIVE_SYSTEM_CLICK 
XRT_INPUT_VIVE_SQUEEZE_CLICK 
XRT_INPUT_VIVE_MENU_CLICK 
XRT_INPUT_VIVE_TRIGGER_CLICK 
XRT_INPUT_VIVE_TRIGGER_VALUE 
XRT_INPUT_VIVE_TRACKPAD 
XRT_INPUT_VIVE_TRACKPAD_CLICK 
XRT_INPUT_VIVE_TRACKPAD_TOUCH 
XRT_INPUT_VIVE_GRIP_POSE 
XRT_INPUT_VIVE_AIM_POSE 
XRT_INPUT_VIVEPRO_SYSTEM_CLICK 
XRT_INPUT_VIVEPRO_VOLUP_CLICK 
XRT_INPUT_VIVEPRO_VOLDN_CLICK 
XRT_INPUT_VIVEPRO_MUTE_MIC_CLICK 
XRT_INPUT_WMR_MENU_CLICK 
XRT_INPUT_WMR_SQUEEZE_CLICK 
XRT_INPUT_WMR_TRIGGER_VALUE 
XRT_INPUT_WMR_THUMBSTICK_CLICK 
XRT_INPUT_WMR_THUMBSTICK 
XRT_INPUT_WMR_TRACKPAD_CLICK 
XRT_INPUT_WMR_TRACKPAD_TOUCH 
XRT_INPUT_WMR_TRACKPAD 
XRT_INPUT_WMR_GRIP_POSE 
XRT_INPUT_WMR_AIM_POSE 
XRT_INPUT_XBOX_MENU_CLICK 
XRT_INPUT_XBOX_VIEW_CLICK 
XRT_INPUT_XBOX_A_CLICK 
XRT_INPUT_XBOX_B_CLICK 
XRT_INPUT_XBOX_X_CLICK 
XRT_INPUT_XBOX_Y_CLICK 
XRT_INPUT_XBOX_DPAD_DOWN_CLICK 
XRT_INPUT_XBOX_DPAD_RIGHT_CLICK 
XRT_INPUT_XBOX_DPAD_UP_CLICK 
XRT_INPUT_XBOX_DPAD_LEFT_CLICK 
XRT_INPUT_XBOX_SHOULDER_LEFT_CLICK 
XRT_INPUT_XBOX_SHOULDER_RIGHT_CLICK 
XRT_INPUT_XBOX_THUMBSTICK_LEFT_CLICK 
XRT_INPUT_XBOX_THUMBSTICK_LEFT 
XRT_INPUT_XBOX_THUMBSTICK_RIGHT_CLICK 
XRT_INPUT_XBOX_THUMBSTICK_RIGHT 
XRT_INPUT_XBOX_LEFT_TRIGGER_VALUE 
XRT_INPUT_XBOX_RIGHT_TRIGGER_VALUE 
XRT_INPUT_GO_SYSTEM_CLICK 
XRT_INPUT_GO_TRIGGER_CLICK 
XRT_INPUT_GO_BACK_CLICK 
XRT_INPUT_GO_TRACKPAD_CLICK 
XRT_INPUT_GO_TRACKPAD_TOUCH 
XRT_INPUT_GO_TRACKPAD 
XRT_INPUT_GO_GRIP_POSE 
XRT_INPUT_GO_AIM_POSE 
XRT_INPUT_TOUCH_X_CLICK 
XRT_INPUT_TOUCH_X_TOUCH 
XRT_INPUT_TOUCH_Y_CLICK 
XRT_INPUT_TOUCH_Y_TOUCH 
XRT_INPUT_TOUCH_MENU_CLICK 
XRT_INPUT_TOUCH_A_CLICK 
XRT_INPUT_TOUCH_A_TOUCH 
XRT_INPUT_TOUCH_B_CLICK 
XRT_INPUT_TOUCH_B_TOUCH 
XRT_INPUT_TOUCH_SYSTEM_CLICK 
XRT_INPUT_TOUCH_SQUEEZE_VALUE 
XRT_INPUT_TOUCH_TRIGGER_TOUCH 
XRT_INPUT_TOUCH_TRIGGER_VALUE 
XRT_INPUT_TOUCH_THUMBSTICK_CLICK 
XRT_INPUT_TOUCH_THUMBSTICK_TOUCH 
XRT_INPUT_TOUCH_THUMBSTICK 
XRT_INPUT_TOUCH_THUMBREST_TOUCH 
XRT_INPUT_TOUCH_GRIP_POSE 
XRT_INPUT_TOUCH_AIM_POSE 
XRT_INPUT_HAND_SELECT_VALUE 
XRT_INPUT_HAND_SQUEEZE_VALUE 
XRT_INPUT_HAND_GRIP_POSE 
XRT_INPUT_HAND_AIM_POSE 

◆ xrt_input_type

#include <xrt/xrt_defines.h>

Base type of this inputs.

Enumerator
XRT_INPUT_TYPE_VEC1_ZERO_TO_ONE 

Float input in [0, 1].

XRT_INPUT_TYPE_VEC1_MINUS_ONE_TO_ONE 

Float input in [-1, 1].

XRT_INPUT_TYPE_VEC2_MINUS_ONE_TO_ONE 

Vec2 input, components in [-1, 1].

XRT_INPUT_TYPE_VEC3_MINUS_ONE_TO_ONE 

Vec3 input, components in [-1, 1].

XRT_INPUT_TYPE_BOOLEAN 

Boolean (digital, binary) input.

XRT_INPUT_TYPE_POSE 

A tracked pose.

XRT_INPUT_TYPE_HAND_TRACKING 

A tracked hand.

◆ xrt_layer_composition_flags

#include <xrt/xrt_compositor.h>

Bit field for holding information about how a layer should be composited.

Enumerator
XRT_LAYER_COMPOSITION_CORRECT_CHROMATIC_ABERRATION_BIT 
XRT_LAYER_COMPOSITION_BLEND_TEXTURE_SOURCE_ALPHA_BIT 
XRT_LAYER_COMPOSITION_UNPREMULTIPLIED_ALPHA_BIT 
XRT_LAYER_COMPOSITION_VIEW_SPACE_BIT 

The layer is locked to the device and the pose should only be adjusted for the IPD.

◆ xrt_layer_eye_visibility

#include <xrt/xrt_compositor.h>

Which view is the layer visible to?

Used for quad layers.

Note
Doesn't have the same values as the OpenXR counterpart!
Enumerator
XRT_LAYER_EYE_VISIBILITY_NONE 
XRT_LAYER_EYE_VISIBILITY_LEFT_BIT 
XRT_LAYER_EYE_VISIBILITY_RIGHT_BIT 
XRT_LAYER_EYE_VISIBILITY_BOTH 

◆ xrt_layer_type

#include <xrt/xrt_compositor.h>

Layer type.

Enumerator
XRT_LAYER_STEREO_PROJECTION 
XRT_LAYER_STEREO_PROJECTION_DEPTH 
XRT_LAYER_QUAD 
XRT_LAYER_CUBE 
XRT_LAYER_CYLINDER 
XRT_LAYER_EQUIRECT1 
XRT_LAYER_EQUIRECT2 

◆ xrt_output_name

#include <xrt/xrt_defines.h>

Name of a output with a baked in type.

See also
xrt_output_type
Enumerator
XRT_OUTPUT_NAME_SIMPLE_VIBRATION 
XRT_OUTPUT_NAME_PSMV_RUMBLE_VIBRATION 
XRT_OUTPUT_NAME_INDEX_HAPTIC 
XRT_OUTPUT_NAME_VIVE_HAPTIC 
XRT_OUTPUT_NAME_WMR_HAPTIC 
XRT_OUTPUT_NAME_XBOX_HAPTIC_LEFT 
XRT_OUTPUT_NAME_XBOX_HAPTIC_RIGHTT 
XRT_OUTPUT_NAME_XBOX_HAPTIC_LEFT_TRIGGER 
XRT_OUTPUT_NAME_XBOX_HAPTIC_RIGHT_TRIGGER 
XRT_OUTPUT_NAME_TOUCH_HAPTIC 

◆ xrt_output_type

#include <xrt/xrt_defines.h>

Base type of this output.

Enumerator
XRT_OUTPUT_TYPE_VIBRATION 

◆ xrt_settings_camera_type

#include <xrt/xrt_settings.h>

Camera type.

Enumerator
XRT_SETTINGS_CAMERA_TYPE_REGULAR_MONO 
XRT_SETTINGS_CAMERA_TYPE_REGULAR_SBS 
XRT_SETTINGS_CAMERA_TYPE_PS4 
XRT_SETTINGS_CAMERA_TYPE_LEAP_MOTION 

◆ xrt_space_relation_flags

#include <xrt/xrt_defines.h>

Flags of which components of a xrt_space_relation is valid.

See also
xrt_space_relation
Enumerator
XRT_SPACE_RELATION_ORIENTATION_VALID_BIT 
XRT_SPACE_RELATION_POSITION_VALID_BIT 
XRT_SPACE_RELATION_LINEAR_VELOCITY_VALID_BIT 
XRT_SPACE_RELATION_ANGULAR_VELOCITY_VALID_BIT 
XRT_SPACE_RELATION_ORIENTATION_TRACKED_BIT 
XRT_SPACE_RELATION_POSITION_TRACKED_BIT 
XRT_SPACE_RELATION_BITMASK_ALL 
XRT_SPACE_RELATION_BITMASK_NONE 

◆ xrt_stereo_format

#include <xrt/xrt_defines.h>

What type of stereo format a frame has.

Enumerator
XRT_STEREO_FORMAT_NONE 
XRT_STEREO_FORMAT_SBS 

Side by side.

XRT_STEREO_FORMAT_INTERLEAVED 

Interleaved pixels.

XRT_STEREO_FORMAT_OAU 

Over & Under.

◆ xrt_swapchain_create_flags

#include <xrt/xrt_compositor.h>

Special flags for creating swapchain images.

Enumerator
XRT_SWAPCHAIN_CREATE_PROTECTED_CONTENT 

Our compositor just ignores this bit.

XRT_SWAPCHAIN_CREATE_STATIC_IMAGE 

Signals that the allocator should only allocate one image.

◆ xrt_swapchain_usage_bits

#include <xrt/xrt_compositor.h>

Usage of the swapchain images.

Enumerator
XRT_SWAPCHAIN_USAGE_COLOR 
XRT_SWAPCHAIN_USAGE_DEPTH_STENCIL 
XRT_SWAPCHAIN_USAGE_UNORDERED_ACCESS 
XRT_SWAPCHAIN_USAGE_TRANSFER_SRC 
XRT_SWAPCHAIN_USAGE_TRANSFER_DST 
XRT_SWAPCHAIN_USAGE_SAMPLED 
XRT_SWAPCHAIN_USAGE_MUTABLE_FORMAT 
XRT_SWAPCHAIN_USAGE_INPUT_ATTACHMENT 

◆ xrt_tracking_override_type

#include <xrt/xrt_settings.h>

Enumerator
XRT_TRACKING_OVERRIDE_DIRECT 
XRT_TRACKING_OVERRIDE_ATTACHED 

◆ xrt_tracking_type

#include <xrt/xrt_tracking.h>

What kind of tracking system is this.

Todo:
Is none, Colour, IR, Magnetic the kind of type we need to know about?
Enumerator
XRT_TRACKING_TYPE_NONE 
XRT_TRACKING_TYPE_RGB 
XRT_TRACKING_TYPE_LIGHTHOUSE 
XRT_TRACKING_TYPE_HYDRA 
XRT_TRACKING_TYPE_EXTERNAL_SLAM 
XRT_TRACKING_TYPE_OTHER 

◆ xrt_view_type

#include <xrt/xrt_compositor.h>

View type to be rendered to by the compositor.

Enumerator
XRT_VIEW_TYPE_MONO 
XRT_VIEW_TYPE_STEREO 

Function Documentation

◆ xrt_comp_begin_frame()

static xrt_result_t xrt_comp_begin_frame ( struct xrt_compositor xc,
int64_t  frame_id 
)
inline

◆ xrt_comp_begin_session()

static xrt_result_t xrt_comp_begin_session ( struct xrt_compositor xc,
enum xrt_view_type  view_type 
)
inline

See xrBeginSession.

Helper for calling through the function pointer.

References xrt_compositor::begin_session.

Referenced by client_gl_compositor_begin_session(), client_vk_compositor_begin_session(), ipc_handle_session_begin(), multi_main_loop(), and oxr_session_begin().

◆ xrt_comp_create_swapchain()

static xrt_result_t xrt_comp_create_swapchain ( struct xrt_compositor xc,
const struct xrt_swapchain_create_info info,
struct xrt_swapchain **  out_xsc 
)
inline

Create a swapchain with a set of images.

The pointer pointed to by out_xsc has to either be NULL or a valid xrt_swapchain pointer. If there is a valid xrt_swapchain pointed by the pointed pointer it will have it reference decremented.

Helper for calling through the function pointer.

References xrt_compositor::create_swapchain.

Referenced by ipc_handle_swapchain_create(), multi_compositor_create_swapchain(), and oxr_create_swapchain().

◆ xrt_comp_destroy()

static void xrt_comp_destroy ( struct xrt_compositor **  xc_ptr)
inline

Teardown the compositor.

The state tracker must have made sure that no frames or sessions are currently pending. See discard_frame, end_frame, end_session.

Helper for calling through the function pointer: does a null check and sets xc_ptr to null if freed.

References xrt_compositor::destroy.

Referenced by ipc_server_client_destroy_compositor().

◆ xrt_comp_discard_frame()

static xrt_result_t xrt_comp_discard_frame ( struct xrt_compositor xc,
int64_t  frame_id 
)
inline

This isn't in the OpenXR API but is explicit in the XRT interfaces.

Two calls to xrBeginFrame will cause the state tracker to call.

xc->begin_frame(xc, frame_id)
xc->discard_frame(xc, frame_id)
xc->begin_frame(xc, frame_id)

Helper for calling through the function pointer.

References xrt_compositor::discard_frame.

Referenced by client_gl_compositor_discard_frame(), client_vk_compositor_discard_frame(), ipc_handle_compositor_discard_frame(), oxr_session_end(), and oxr_session_frame_begin().

◆ xrt_comp_end_session()

static xrt_result_t xrt_comp_end_session ( struct xrt_compositor xc)
inline

See xrEndSession, unlike the OpenXR one the state tracker is responsible to call discard frame before calling this function.

See discard_frame.

Helper for calling through the function pointer.

References xrt_compositor::end_session.

Referenced by client_gl_compositor_end_session(), client_vk_compositor_end_session(), ipc_handle_session_end(), multi_main_loop(), and oxr_session_end().

◆ xrt_comp_import_fence()

static xrt_result_t xrt_comp_import_fence ( struct xrt_compositor xc,
xrt_graphics_sync_handle_t  handle,
struct xrt_compositor_fence **  out_xcf 
)
inline

Create a compositor fence from a native sync handle.

Helper for calling through the function pointer.

References xrt_compositor::import_fence.

Referenced by multi_compositor_import_fence(), and multi_compositor_layer_commit().

◆ xrt_comp_import_swapchain()

static xrt_result_t xrt_comp_import_swapchain ( struct xrt_compositor xc,
const struct xrt_swapchain_create_info info,
struct xrt_image_native native_images,
uint32_t  num_images,
struct xrt_swapchain **  out_xsc 
)
inline

Create a swapchain from a set of native images.

The pointer pointed to by out_xsc has to either be NULL or a valid xrt_swapchain pointer. If there is a valid xrt_swapchain pointed by the pointed pointer it will have it reference decremented.

Helper for calling through the function pointer.

References xrt_compositor::import_swapchain.

Referenced by ipc_handle_swapchain_import(), and multi_compositor_import_swapchain().

◆ xrt_comp_layer_begin()

static xrt_result_t xrt_comp_layer_begin ( struct xrt_compositor xc,
int64_t  frame_id,
uint64_t  display_time_ns,
enum xrt_blend_mode  env_blend_mode 
)
inline

Begins layer submission, this and the other layer_* calls are equivalent to xrEndFrame, except over multiple calls.

It's only after layer_commit that layers will be displayed. From the point of view of the swapchain the image is used as soon as it's given in a call.

Helper for calling through the function pointer.

References xrt_compositor::layer_begin.

Referenced by client_gl_compositor_layer_begin(), client_vk_compositor_layer_begin(), ipc_handle_compositor_layer_sync(), and multi_main_loop().

◆ xrt_comp_layer_commit()

static xrt_result_t xrt_comp_layer_commit ( struct xrt_compositor xc,
int64_t  frame_id,
xrt_graphics_sync_handle_t  sync_handle 
)
inline

Commits all of the submitted layers, it's from this on that the compositor will use the layers.

Helper for calling through the function pointer.

References xrt_compositor::layer_commit.

Referenced by client_gl_compositor_layer_commit(), client_vk_compositor_layer_commit(), ipc_handle_compositor_layer_sync(), and multi_main_loop().

◆ xrt_comp_layer_cube()

static xrt_result_t xrt_comp_layer_cube ( struct xrt_compositor xc,
struct xrt_device xdev,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)
inline

Adds a cube layer for submission.

Parameters
xcSelf pointer
xdevThe device the layer is relative to.
xscSwapchain.
dataAll of the pure data bits.

Helper for calling through the function pointer.

References xrt_compositor::layer_cube.

Referenced by _update_cube_layer(), client_gl_compositor_layer_cube(), client_vk_compositor_layer_cube(), and do_cube_layer().

◆ xrt_comp_layer_cylinder()

static xrt_result_t xrt_comp_layer_cylinder ( struct xrt_compositor xc,
struct xrt_device xdev,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)
inline

Adds a cylinder layer for submission.

Parameters
xcSelf pointer
xdevThe device the layer is relative to.
xscSwapchain.
dataAll of the pure data bits.

Helper for calling through the function pointer.

References xrt_compositor::layer_cylinder.

Referenced by _update_cylinder_layer(), client_gl_compositor_layer_cylinder(), client_vk_compositor_layer_cylinder(), and do_cylinder_layer().

◆ xrt_comp_layer_equirect1()

static xrt_result_t xrt_comp_layer_equirect1 ( struct xrt_compositor xc,
struct xrt_device xdev,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)
inline

Adds a equirect1 layer for submission.

Parameters
xcSelf pointer
xdevThe device the layer is relative to.
xscSwapchain.
dataAll of the pure data bits.

Helper for calling through the function pointer.

References xrt_compositor::layer_equirect1.

Referenced by _update_equirect1_layer(), client_gl_compositor_layer_equirect1(), client_vk_compositor_layer_equirect1(), and do_equirect1_layer().

◆ xrt_comp_layer_equirect2()

static xrt_result_t xrt_comp_layer_equirect2 ( struct xrt_compositor xc,
struct xrt_device xdev,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)
inline

Adds a equirect2 layer for submission.

Parameters
xcSelf pointer
xdevThe device the layer is relative to.
xscSwapchain.
dataAll of the pure data bits.

Helper for calling through the function pointer.

References xrt_compositor::layer_equirect2.

Referenced by _update_equirect2_layer(), client_gl_compositor_layer_equirect2(), client_vk_compositor_layer_equirect2(), and do_equirect2_layer().

◆ xrt_comp_layer_quad()

static xrt_result_t xrt_comp_layer_quad ( struct xrt_compositor xc,
struct xrt_device xdev,
struct xrt_swapchain xsc,
const struct xrt_layer_data data 
)
inline

Adds a quad layer for submission, the center of the quad is specified by the pose and extends outwards from it.

Parameters
xcSelf pointer
xdevThe device the layer is relative to.
xscSwapchain.
dataAll of the pure data bits.

Helper for calling through the function pointer.

References xrt_compositor::layer_quad.

Referenced by _update_quad_layer(), client_gl_compositor_layer_quad(), client_vk_compositor_layer_quad(), and do_quad_layer().

◆ xrt_comp_layer_stereo_projection()

static xrt_result_t xrt_comp_layer_stereo_projection ( struct xrt_compositor xc,
struct xrt_device xdev,
struct xrt_swapchain l_xsc,
struct xrt_swapchain r_xsc,
const struct xrt_layer_data data 
)
inline

Adds a stereo projection layer for submissions.

Parameters
xcSelf pointer
xdevThe device the layer is relative to.
l_xscLeft swapchain.
r_xscRight swapchain.
dataAll of the pure data bits.

Helper for calling through the function pointer.

References xrt_compositor::layer_stereo_projection.

Referenced by _update_projection_layer(), client_gl_compositor_layer_stereo_projection(), client_vk_compositor_layer_stereo_projection(), and do_projection_layer().

◆ xrt_comp_layer_stereo_projection_depth()

static xrt_result_t xrt_comp_layer_stereo_projection_depth ( struct xrt_compositor xc,
struct xrt_device xdev,
struct xrt_swapchain l_xsc,
struct xrt_swapchain r_xsc,
struct xrt_swapchain l_d_xsc,
struct xrt_swapchain r_d_xsc,
const struct xrt_layer_data data 
)
inline

Adds a stereo projection layer for submission, has depth information.

Parameters
xcSelf pointer
xdevThe device the layer is relative to.
l_xscLeft swapchain.
r_xscRight swapchain.
l_d_xscLeft depth swapchain.
r_d_xscRight depth swapchain.
dataAll of the pure data bits.

Helper for calling through the function pointer.

References xrt_compositor::layer_stereo_projection_depth.

Referenced by _update_projection_layer_depth(), client_gl_compositor_layer_stereo_projection_depth(), client_vk_compositor_layer_stereo_projection_depth(), and do_projection_layer_depth().

◆ xrt_comp_mark_frame()

static xrt_result_t xrt_comp_mark_frame ( struct xrt_compositor xc,
int64_t  frame_id,
enum xrt_compositor_frame_point  point,
uint64_t  when_ns 
)
inline

This function and predict_frame function calls are a alternative to wait_frame.

The client calls this function to mark that it woke up from waiting on a frame.

Helper for calling through the function pointer.

References xrt_compositor::mark_frame.

Referenced by compositor_wait_frame(), ipc_handle_compositor_wait_woke(), multi_compositor_wait_frame(), and wait_frame().

◆ xrt_comp_native_create_swapchain()

static xrt_result_t xrt_comp_native_create_swapchain ( struct xrt_compositor_native xcn,
const struct xrt_swapchain_create_info info,
struct xrt_swapchain_native **  out_xscn 
)
inline

Create a native swapchain with a set of images.

A specialized version of xrt_comp_create_swapchain, for use only on xrt_compositor_native.

Helper for calling through the base's function pointer then performing the known-safe downcast.

The pointer pointed to by out_xsc has to either be NULL or a valid xrt_swapchain pointer. If there is a valid xrt_swapchain pointed by the pointed pointer it will have it reference decremented.

References xrt_compositor_native::base, and XRT_SUCCESS.

Referenced by client_gl_swapchain_create(), and client_vk_swapchain_create().

◆ xrt_comp_native_destroy()

static void xrt_comp_native_destroy ( struct xrt_compositor_native **  xcn_ptr)
inline

Teardown the compositor.

The state tracker must have made sure that no frames or sessions are currently pending. See discard_frame, end_frame, end_session.

Helper for calling through the function pointer: does a null check and sets xcn_ptr to null if freed.

References xrt_compositor_native::base, and xrt_compositor::destroy.

Referenced by system_compositor_destroy().

◆ xrt_comp_poll_events()

static xrt_result_t xrt_comp_poll_events ( struct xrt_compositor xc,
union xrt_compositor_event out_xce 
)
inline

Poll events from this compositor.

This function is very much WIP.

Helper for calling through the function pointer.

References xrt_compositor::poll_events.

Referenced by client_gl_compositor_poll_events(), client_vk_compositor_poll_events(), and ipc_handle_compositor_poll_events().

◆ xrt_comp_predict_frame()

static xrt_result_t xrt_comp_predict_frame ( struct xrt_compositor xc,
int64_t *  out_frame_id,
uint64_t *  out_wake_time_ns,
uint64_t *  out_predicted_gpu_time_ns,
uint64_t *  out_predicted_display_time_ns,
uint64_t *  out_predicted_display_period_ns 
)
inline

This function and mark_frame function calls are a alternative to wait_frame.

The only requirement on the compositor for the frame_id is that it is a positive number.

Parameters
[out]xcThe compositor
[out]out_frame_idFrame id
[out]out_wake_time_nsWhen we want the client to be awoken to begin rendering.
[out]out_predicted_gpu_time_nsWhen we expect the client to finish the GPU work.
[out]out_predicted_display_time_nsWhen the pixels turns into photons.
[out]out_predicted_display_period_nsThe period for the frames.

Helper for calling through the function pointer.

References xrt_compositor::predict_frame.

Referenced by compositor_wait_frame(), ipc_handle_compositor_predict_frame(), multi_compositor_wait_frame(), and wait_frame().

◆ xrt_comp_wait_frame()

static xrt_result_t xrt_comp_wait_frame ( struct xrt_compositor xc,
int64_t *  out_frame_id,
uint64_t *  predicted_display_time,
uint64_t *  predicted_display_period 
)
inline

See xrWaitFrame.

The only requirement on the compositor for the frame_id is that it is a positive number.

Helper for calling through the function pointer.

References xrt_compositor::wait_frame.

Referenced by client_gl_compositor_wait_frame(), client_vk_compositor_wait_frame(), and oxr_session_frame_wait().

◆ xrt_compositor_fence_destroy()

static void xrt_compositor_fence_destroy ( struct xrt_compositor_fence **  xcf_ptr)
inline

Destroys the fence.

Helper for calling through the function pointer: does a null check and sets xcf_ptr to null if freed.

References xrt_compositor_fence::destroy.

Referenced by wait_fence().

◆ xrt_compositor_fence_wait()

static xrt_result_t xrt_compositor_fence_wait ( struct xrt_compositor_fence xcf,
uint64_t  timeout 
)
inline

Destroys the fence.

Helper for calling through the function pointer.

References xrt_compositor_fence::wait.

Referenced by wait_fence().

◆ xrt_frame_reference()

static void xrt_frame_reference ( struct xrt_frame **  dst,
struct xrt_frame src 
)
related

◆ xrt_gfx_gl_get_versions()

void xrt_gfx_gl_get_versions ( struct xrt_api_requirements ver)

◆ xrt_gfx_gles_get_versions()

void xrt_gfx_gles_get_versions ( struct xrt_api_requirements ver)

◆ xrt_gfx_provider_create_gl_egl()

xrt_result_t xrt_gfx_provider_create_gl_egl ( struct xrt_compositor_native xcn,
EGLDisplay  display,
EGLConfig  config,
EGLContext  context,
PFNEGLGETPROCADDRESSPROC  getProcAddress,
struct xrt_compositor_gl **  out_xcgl 
)

Create an OpenGL(ES) compositor client using EGL.

◆ xrt_gfx_provider_create_gl_xlib()

struct xrt_compositor_gl * xrt_gfx_provider_create_gl_xlib ( struct xrt_compositor_native xcn,
Display xDisplay,
uint32_t  visualid,
GLXFBConfig  glxFBConfig,
GLXDrawable  glxDrawable,
GLXContext  glxContext 
)

Create an OpenGL compositor client using xlib.

Referenced by oxr_session_populate_gl_xlib().

◆ xrt_gfx_provider_create_system()

xrt_result_t xrt_gfx_provider_create_system ( struct xrt_device xdev,
struct xrt_system_compositor **  out_xsysc 
)
related

Creates the main system compositor.

Referenced by t_instance_create_system_compositor().

◆ xrt_gfx_vk_get_versions()

void xrt_gfx_vk_get_versions ( struct xrt_api_requirements ver)

#include <xrt/xrt_gfx_vk.h>

Referenced by oxr_vk_get_requirements().

◆ xrt_gfx_vk_provider_create()

struct xrt_compositor_vk * xrt_gfx_vk_provider_create ( struct xrt_compositor_native xcn,
VkInstance  instance,
PFN_vkGetInstanceProcAddr  get_instance_proc_addr,
VkPhysicalDevice  physical_device,
VkDevice  device,
uint32_t  queue_family_index,
uint32_t  queue_index 
)

Create a Vulkan compositor client.

Referenced by oxr_session_populate_vk().

◆ xrt_images_destroy()

static void xrt_images_destroy ( struct xrt_image_native_allocator **  xina_ptr)
inline

Destroy the image allocator.

Helper for calling through the function pointer: does a null check and sets xina_ptr to null if freed.

References xrt_image_native_allocator::destroy.

Referenced by ipc_client_instance_create_system_compositor().

◆ xrt_instance_create()

int xrt_instance_create ( struct xrt_instance_info ii,
struct xrt_instance **  out_xinst 
)
related

Create an implementation of the xrt_instance interface.

Creating more then one xrt_instance is probably never the right thing to do, so avoid it.

Each target must implement this function.

Parameters
[in]iiA pointer to a info struct containing information about the application.
[out]out_xinstA pointer to an xrt_instance pointer. Will be populated.
Returns
0 on success

Referenced by cli_cmd_probe(), cli_cmd_test(), gui_prober_init(), init_all(), and oxr_instance_create().

◆ xrt_instance_create_system_compositor()

static int xrt_instance_create_system_compositor ( struct xrt_instance xinst,
struct xrt_device xdev,
struct xrt_system_compositor **  out_xsc 
)
inline

Creates a xrt_system_compositor.

Should only be called once.

Note
Code consuming this interface should use xrt_instance_create_system_compositor()
Parameters
xinstPointer to self
[in]xdevDevice to use for creating the compositor
[out]out_xscPointer to create_system_compositor pointer, will be populated.
Returns
0 on success, <0 on error.
See also
xrt_gfx_provider_create_native

Helper for calling through the function pointer.

References xrt_instance::create_system_compositor.

Referenced by init_all(), and oxr_instance_create().

◆ xrt_instance_destroy()

static void xrt_instance_destroy ( struct xrt_instance **  xinst_ptr)
inline

Destroy an xrt_instance - helper function.

Parameters
[in,out]xinst_ptrA pointer to your instance implementation pointer.

Will destroy the instance if *xinst_ptr is not NULL. Will then set *xinst_ptr to NULL.

References xrt_instance::destroy, and xrt_instance_create().

Referenced by do_exit(), gui_prober_teardown(), oxr_instance_destroy(), and teardown_all().

◆ xrt_instance_get_prober()

static int xrt_instance_get_prober ( struct xrt_instance xinst,
struct xrt_prober **  out_xp 
)
inline

Get the instance xrt_prober, if any.

If the instance is not using an xrt_prober, it may return null.

The instance retains ownership of the prober and is responsible for destroying it.

Can be called multiple times. (The prober is usually created at instance construction time.)

Note
Code consuming this interface should use xrt_instance_get_prober().
Parameters
xinstPointer to self
[out]out_xpPointer to xrt_prober pointer, will be populated or set to NULL.
Returns
0 on success, <0 on error. (Note that success may mean returning a null pointer!)

Helper for calling through the function pointer.

References xrt_instance::get_prober.

Referenced by cli_cmd_probe(), cli_cmd_test(), and gui_prober_init().

◆ xrt_instance_select()

static int xrt_instance_select ( struct xrt_instance xinst,
struct xrt_device **  xdevs,
size_t  num_xdevs 
)
inline

Returns the devices of the system represented as xrt_device.

Should only be called once.

Note
Code consuming this interface should use xrt_instance_select()
Parameters
xinstPointer to self
[in,out]xdevsPointer to xrt_device array. Array elements will be populated.
[in]num_xdevsThe capacity of the xdevs array.
Returns
0 on success, <0 on error.
See also
xrt_prober::probe, xrt_prober::select

Helper for calling through the function pointer.

References xrt_instance::select.

Referenced by cli_cmd_probe(), cli_cmd_test(), gui_prober_select(), init_all(), and oxr_instance_create().

◆ xrt_swapchain_acquire_image()

static xrt_result_t xrt_swapchain_acquire_image ( struct xrt_swapchain xsc,
uint32_t *  out_index 
)
inline

Obtain the index of the next image to use, without blocking on being able to write to it.

See xrAcquireSwapchainImage.

Caller must make sure that no image is acquired before calling acquire_image.

Parameters
xscSelf pointer
[out]out_indexImage index to use next

Helper for calling through the function pointer.

References xrt_swapchain::acquire_image.

Referenced by client_gl_swapchain_acquire_image(), client_vk_swapchain_acquire_image(), and ipc_handle_swapchain_acquire_image().

◆ xrt_swapchain_native_reference()

static void xrt_swapchain_native_reference ( struct xrt_swapchain_native **  dst,
struct xrt_swapchain_native src 
)
related

Update the reference counts on swapchain(s).

Parameters
dstPointer to a object reference, if the object reference is non-null will decrement it's counter. The reference that dst points to will be set to src.
[in]srcObject to be have it's refcount increased dst is set to this.

Referenced by client_gl_eglimage_swapchain_destroy(), and client_vk_swapchain_destroy().

◆ xrt_swapchain_reference()

static void xrt_swapchain_reference ( struct xrt_swapchain **  dst,
struct xrt_swapchain src 
)
related

◆ xrt_swapchain_release_image()

static xrt_result_t xrt_swapchain_release_image ( struct xrt_swapchain xsc,
uint32_t  index 
)
inline

See xrReleaseSwapchainImage, state tracker needs to track index.

Helper for calling through the function pointer.

References xrt_swapchain::release_image.

Referenced by client_gl_swapchain_release_image(), client_vk_swapchain_release_image(), and ipc_handle_swapchain_release_image().

◆ xrt_swapchain_wait_image()

static xrt_result_t xrt_swapchain_wait_image ( struct xrt_swapchain xsc,
uint64_t  timeout,
uint32_t  index 
)
inline

See xrWaitSwapchainImage, state tracker needs to track index.

Helper for calling through the function pointer.

References xrt_swapchain::wait_image.

Referenced by client_gl_swapchain_wait_image(), client_vk_swapchain_wait_image(), and ipc_handle_swapchain_wait_image().

◆ xrt_syscomp_create_native_compositor()

static xrt_result_t xrt_syscomp_create_native_compositor ( struct xrt_system_compositor xsc,
const struct xrt_session_info xsi,
struct xrt_compositor_native **  out_xcn 
)
inline

Create a new native compositor.

This signals that you want to start XR, and as such implicitly brings up a new session. Does not "call" xrBeginSession.

Some system compositors might only support that one xrt_compositor is always at a time, will return XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED if this is the case.

Helper for calling through the function pointer.

References xrt_system_compositor::create_native_compositor.

Referenced by ipc_handle_session_create().

◆ xrt_syscomp_destroy()

static void xrt_syscomp_destroy ( struct xrt_system_compositor **  xsc_ptr)
inline

Teardown the system compositor.

The state tracker must make sure that no compositors are alive.

Helper for calling through the function pointer: does a null check and sets xcn_ptr to null if freed.

References xrt_system_compositor::destroy.

Referenced by oxr_instance_destroy(), and teardown_all().

◆ xrt_syscomp_set_main_app_visibility()

static xrt_result_t xrt_syscomp_set_main_app_visibility ( struct xrt_system_compositor xsc,
struct xrt_compositor xc,
bool  visible 
)
inline

Tell this client/session if the main application is visible or not.

Helper for calling through the function pointer.

References xrt_multi_compositor_control::set_main_app_visibility, xrt_system_compositor::xmcc, and XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED.

Referenced by handle_overlay_client_events().

◆ xrt_syscomp_set_state()

static xrt_result_t xrt_syscomp_set_state ( struct xrt_system_compositor xsc,
struct xrt_compositor xc,
bool  visible,
bool  focused 
)
inline

Sets the state of the compositor, generating any events to the client if the state is actually changed.

Input focus is enforced/handled by a different component but is still signaled by the compositor.

Helper for calling through the function pointer.

References xrt_multi_compositor_control::set_state, xrt_system_compositor::xmcc, and XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED.

Referenced by handle_focused_client_events(), and ipc_handle_session_create().

◆ xrt_syscomp_set_z_order()

static xrt_result_t xrt_syscomp_set_z_order ( struct xrt_system_compositor xsc,
struct xrt_compositor xc,
int64_t  z_order 
)
inline

Set the rendering Z order for rendering, visible has higher priority then z_order but is still saved until visible again.

This a signed 64 bit integer compared to a unsigned 32 bit integer in OpenXR, so that non-overlay clients can be handled like overlay ones.

Helper for calling through the function pointer.

References xrt_multi_compositor_control::set_z_order, xrt_system_compositor::xmcc, and XRT_ERROR_MULTI_SESSION_NOT_IMPLEMENTED.

Referenced by handle_focused_client_events(), and ipc_handle_session_create().

◆ xrt_tracked_hand_get_joints()

static void xrt_tracked_hand_get_joints ( struct xrt_tracked_hand h,
enum xrt_input_name  name,
timepoint_ns  when_ns,
struct u_hand_joint_default_set out_joints,
struct xrt_space_relation out_relation 
)
inline

◆ xrt_tracked_psmv_destroy()

static void xrt_tracked_psmv_destroy ( struct xrt_tracked_psmv **  xtmv_ptr)
inline

◆ xrt_tracked_psmv_get_tracked_pose()

static void xrt_tracked_psmv_get_tracked_pose ( struct xrt_tracked_psmv psmv,
enum xrt_input_name  name,
timepoint_ns  when_ns,
struct xrt_space_relation out_relation 
)
inline

◆ xrt_tracked_psmv_push_imu()

static void xrt_tracked_psmv_push_imu ( struct xrt_tracked_psmv psmv,
timepoint_ns  timestamp_ns,
struct xrt_tracking_sample sample 
)
inline

◆ xrt_tracked_psvr_destroy()

static void xrt_tracked_psvr_destroy ( struct xrt_tracked_psvr **  xtvr_ptr)
inline

◆ xrt_tracked_psvr_get_tracked_pose()

static void xrt_tracked_psvr_get_tracked_pose ( struct xrt_tracked_psvr psvr,
timepoint_ns  when_ns,
struct xrt_space_relation out_relation 
)
inline

◆ xrt_tracked_psvr_push_imu()

static void xrt_tracked_psvr_push_imu ( struct xrt_tracked_psvr psvr,
timepoint_ns  timestamp_ns,
struct xrt_tracking_sample sample 
)
inline

Variable Documentation

◆ xrt_gfx_vk_device_extensions

const char* xrt_gfx_vk_device_extensions

#include <xrt/xrt_gfx_vk.h>

A space-delimited string of Vulkan device extensions required from a client.

Should be kept synchronized with the "Client" column in Vulkan extensions used by Monado

Referenced by oxr_vk_get_device_exts().

◆ xrt_gfx_vk_instance_extensions

const char* xrt_gfx_vk_instance_extensions

#include <xrt/xrt_gfx_vk.h>

A space-delimited string of Vulkan instance extensions required from a client.

Should be kept synchronized with the "Client" column in Vulkan extensions used by Monado

Referenced by oxr_vk_get_instance_exts().