diff options
Diffstat (limited to 'intern/ghost/intern/GHOST_XrContext.cpp')
-rw-r--r-- | intern/ghost/intern/GHOST_XrContext.cpp | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/intern/ghost/intern/GHOST_XrContext.cpp b/intern/ghost/intern/GHOST_XrContext.cpp index 2bf67c121f8..daad0b8190a 100644 --- a/intern/ghost/intern/GHOST_XrContext.cpp +++ b/intern/ghost/intern/GHOST_XrContext.cpp @@ -55,7 +55,6 @@ void *GHOST_XrContext::s_error_handler_customdata = nullptr; /* -------------------------------------------------------------------- */ /** \name Create, Initialize and Destruct - * * \{ */ GHOST_XrContext::GHOST_XrContext(const GHOST_XrContextCreateInfo *create_info) @@ -153,7 +152,6 @@ void GHOST_XrContext::storeInstanceProperties() /* -------------------------------------------------------------------- */ /** \name Debug Printing - * * \{ */ void GHOST_XrContext::printInstanceInfo() @@ -242,14 +240,13 @@ void GHOST_XrContext::initDebugMessenger() /* -------------------------------------------------------------------- */ /** \name Error handling - * * \{ */ void GHOST_XrContext::dispatchErrorMessage(const GHOST_XrException *exception) const { GHOST_XrError error; - error.user_message = exception->m_msg; + error.user_message = exception->m_msg.data(); error.customdata = s_error_handler_customdata; if (isDebugMode()) { @@ -273,7 +270,6 @@ void GHOST_XrContext::setErrorHandler(GHOST_XrErrorHandlerFn handler_fn, void *c /* -------------------------------------------------------------------- */ /** \name OpenXR API-Layers and Extensions - * * \{ */ /** @@ -378,7 +374,7 @@ void GHOST_XrContext::getAPILayersToEnable(std::vector<const char *> &r_ext_name for (const std::string &layer : try_layers) { if (openxr_layer_is_available(m_oxr->layers, layer)) { - r_ext_names.push_back(layer.c_str()); + r_ext_names.push_back(layer.data()); } } } @@ -488,6 +484,7 @@ GHOST_TXrGraphicsBinding GHOST_XrContext::determineGraphicsBindingTypeToUse( void GHOST_XrContext::startSession(const GHOST_XrSessionBeginInfo *begin_info) { + m_custom_funcs.session_create_fn = begin_info->create_fn; m_custom_funcs.session_exit_fn = begin_info->exit_fn; m_custom_funcs.session_exit_customdata = begin_info->exit_customdata; @@ -538,6 +535,16 @@ void GHOST_XrContext::handleSessionStateChange(const XrEventDataSessionStateChan * Public as in, exposed in the Ghost API. * \{ */ +GHOST_XrSession *GHOST_XrContext::getSession() +{ + return m_session.get(); +} + +const GHOST_XrSession *GHOST_XrContext::getSession() const +{ + return m_session.get(); +} + void GHOST_XrContext::setGraphicsContextBindFuncs(GHOST_XrGraphicsContextBindFn bind_fn, GHOST_XrGraphicsContextUnbindFn unbind_fn) { @@ -564,7 +571,6 @@ bool GHOST_XrContext::needsUpsideDownDrawing() const /* -------------------------------------------------------------------- */ /** \name Ghost Internal Accessors and Mutators - * * \{ */ GHOST_TXrOpenXRRuntimeID GHOST_XrContext::getOpenXRRuntimeID() const |