Blender V4.3
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()

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

◆ find_action_set()

◆ ghost_xr_draw_view_info_from_view()

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

Definition at line 484 of file GHOST_XrSession.cc.

References copy_openxr_pose_to_ghost_pose().

◆ init_passthrough_extension_functions()

static void init_passthrough_extension_functions ( XrInstance instance)
static

◆ print_debug_timings()

static void print_debug_timings ( GHOST_XrDrawInfo & draw_info)
static

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

Definition at line 414 of file GHOST_XrSession.cc.

References 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 1009 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().

◆ g_xrCreatePassthroughLayerFB

PFN_xrCreatePassthroughLayerFB g_xrCreatePassthroughLayerFB = nullptr
static

Definition at line 1010 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().

◆ g_xrPassthroughLayerResumeFB

PFN_xrPassthroughLayerResumeFB g_xrPassthroughLayerResumeFB = nullptr
static

Definition at line 1012 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().

◆ g_xrPassthroughStartFB

PFN_xrPassthroughStartFB g_xrPassthroughStartFB = nullptr
static

Definition at line 1011 of file GHOST_XrSession.cc.

Referenced by init_passthrough_extension_functions().