Blender V5.0
GHOST_XrSession.cc File Reference
#include <algorithm>
#include <cassert>
#include <chrono>
#include <cstdio>
#include <list>
#include <sstream>
#include "GHOST_C-api.h"
#include "GHOST_IXrGraphicsBinding.hh"
#include "GHOST_XrAction.hh"
#include "GHOST_XrContext.hh"
#include "GHOST_XrControllerModel.hh"
#include "GHOST_XrException.hh"
#include "GHOST_XrSwapchain.hh"
#include "GHOST_Xr_intern.hh"
#include "GHOST_XrSession.hh"

Go to the source code of this file.

Classes

struct  OpenXRSessionData
struct  GHOST_XrDrawInfo

Functions

State Management
static void create_reference_spaces (OpenXRSessionData &oxr, const GHOST_XrPose &base_pose, bool isDebugMode)
Drawing
static void print_debug_timings (GHOST_XrDrawInfo &draw_info)
static void ghost_xr_draw_view_info_from_view (const XrView &view, GHOST_XrDrawViewInfo &r_info)
Actions
static GHOST_XrActionSetfind_action_set (OpenXRSessionData *oxr, const char *action_set_name)

Meta Quest Passthrough

static PFN_xrCreatePassthroughFB g_xrCreatePassthroughFB = nullptr
static PFN_xrCreatePassthroughLayerFB g_xrCreatePassthroughLayerFB = nullptr
static PFN_xrPassthroughStartFB g_xrPassthroughStartFB = nullptr
static PFN_xrPassthroughLayerResumeFB g_xrPassthroughLayerResumeFB = nullptr
static void init_passthrough_extension_functions (XrInstance instance)

Function Documentation

◆ create_reference_spaces()

void create_reference_spaces ( OpenXRSessionData & oxr,
const GHOST_XrPose & base_pose,
bool isDebugMode )
static

◆ find_action_set()

◆ ghost_xr_draw_view_info_from_view()

void ghost_xr_draw_view_info_from_view ( const XrView & view,
GHOST_XrDrawViewInfo & r_info )
static

Definition at line 483 of file GHOST_XrSession.cc.

References copy_openxr_pose_to_ghost_pose(), and view.

◆ init_passthrough_extension_functions()

void init_passthrough_extension_functions ( XrInstance instance)
static

◆ print_debug_timings()

void print_debug_timings ( GHOST_XrDrawInfo & draw_info)
static

Render time of last 8 frames (in ms) to calculate an average.

Definition at line 413 of file GHOST_XrSession.cc.

References assert, GHOST_XrDrawInfo::frame_begin_time, GHOST_XrDrawInfo::last_frame_times, and printf.

Variable Documentation

◆ g_xrCreatePassthroughFB

PFN_xrCreatePassthroughFB g_xrCreatePassthroughFB = nullptr
static

Definition at line 1022 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().

◆ g_xrCreatePassthroughLayerFB

PFN_xrCreatePassthroughLayerFB g_xrCreatePassthroughLayerFB = nullptr
static

Definition at line 1023 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().

◆ g_xrPassthroughLayerResumeFB

PFN_xrPassthroughLayerResumeFB g_xrPassthroughLayerResumeFB = nullptr
static

Definition at line 1025 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().

◆ g_xrPassthroughStartFB

PFN_xrPassthroughStartFB g_xrPassthroughStartFB = nullptr
static

Definition at line 1024 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().