66 error_customdata.
wm = wm;
70 const GHOST_TXrGraphicsBinding gpu_bindings_candidates[] = {
71 GHOST_kXrGraphicsOpenGL,
73 GHOST_kXrGraphicsD3D11,
76 GHOST_XrContextCreateInfo create_info{
77 gpu_bindings_candidates,
80 GHOST_XrContextHandle context;
83 create_info.context_flag |= GHOST_kXrContextDebug;
86 create_info.context_flag |= GHOST_kXrContextDebugTime;
90 create_info.context_flag |= GHOST_kXrContextGpuNVIDIA;
99 GHOST_XrGraphicsContextBindFuncs(context,
164 if ((*runtime)->context !=
nullptr) {
165 GHOST_XrContextHandle context = (*runtime)->
context;
168 (*runtime)->context =
nullptr;
170 if ((*runtime)->area) {
174 (*runtime)->area =
nullptr;
void IDP_FreeProperty(IDProperty *prop)
void BKE_reports_clear(ReportList *reports)
void ED_area_offscreen_free(wmWindowManager *wm, wmWindow *win, ScrArea *area)
GHOST C-API function and type declarations.
GHOST_TSuccess GHOST_XrEventsHandle(GHOST_XrContextHandle xr_contexthandle)
GHOST_XrContextHandle GHOST_XrContextCreate(const GHOST_XrContextCreateInfo *create_info)
void GHOST_XrContextDestroy(GHOST_XrContextHandle xr_contexthandle)
void GHOST_XrErrorHandler(GHOST_XrErrorHandlerFn handler_fn, void *customdata)
Read Guarded memory(de)allocation.
void *(* MEM_callocN)(size_t len, const char *str)
static void error(const char *str)
struct View3DShading shading
WindowManagerRuntimeHandle * runtime
XrSessionSettings session_settings
struct wmXrRuntimeData * runtime
GHOST_XrContextHandle context
wmWindow * session_root_win
void WM_report(eReportType type, const char *message)
void WM_report_banner_show(wmWindowManager *wm, wmWindow *win)
bool wm_xr_init(wmWindowManager *wm)
static void wm_xr_error_handler(const GHOST_XrError *error)
void wm_xr_runtime_data_free(wmXrRuntimeData **runtime)
wmXrRuntimeData * wm_xr_runtime_data_create()
bool wm_xr_events_handle(wmWindowManager *wm)
void wm_xr_exit(wmWindowManager *wm)
void WM_xr_actionmaps_clear(wmXrRuntimeData *runtime)
bool wm_xr_passthrough_enabled(void *customdata)
Check if XR passthrough is enabled.
void wm_xr_disable_passthrough(void *customdata)
Disable XR passthrough if not supported.
void wm_xr_draw_view(const GHOST_XrDrawViewInfo *draw_view, void *customdata)
Draw a viewport for a single eye.
void wm_xr_session_gpu_binding_context_destroy(GHOST_ContextHandle context)
void wm_xr_session_actions_update(wmWindowManager *wm)
void * wm_xr_session_gpu_binding_context_create()
wmWindow * wm_xr_session_root_window_or_fallback_get(const wmWindowManager *wm, const wmXrRuntimeData *runtime_data)
void wm_xr_session_data_free(wmXrSessionState *state)
bool WM_xr_session_is_ready(const wmXrData *xr)