[Bf-blender-cvs] [22966f4d358] soc-2019-openxr: Address changes in OpenXR 1.0 to get rendering to work again
Julian Eisel
noreply at git.blender.org
Wed Jul 31 02:20:32 CEST 2019
Commit: 22966f4d358d525c098bf9bba6417a818b27d8b8
Author: Julian Eisel
Date: Wed Jul 31 02:19:35 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rB22966f4d358d525c098bf9bba6417a818b27d8b8
Address changes in OpenXR 1.0 to get rendering to work again
===================================================================
M intern/ghost/intern/GHOST_XrSession.cpp
M intern/ghost/intern/GHOST_XrSession.h
===================================================================
diff --git a/intern/ghost/intern/GHOST_XrSession.cpp b/intern/ghost/intern/GHOST_XrSession.cpp
index 9407a5381da..2cfeed3d9a6 100644
--- a/intern/ghost/intern/GHOST_XrSession.cpp
+++ b/intern/ghost/intern/GHOST_XrSession.cpp
@@ -383,7 +383,7 @@ void GHOST_XrSession::draw(void *draw_customdata)
beginFrameDrawing();
- if (isVisible()) {
+ if (m_draw_info->frame_state.shouldRender) {
proj_layer = drawLayer(projection_layer_views, draw_customdata);
layers.push_back(reinterpret_cast<XrCompositionLayerBaseHeader *>(&proj_layer));
}
@@ -469,6 +469,7 @@ XrCompositionLayerProjection GHOST_XrSession::drawLayer(
XrCompositionLayerProjection layer{XR_TYPE_COMPOSITION_LAYER_PROJECTION};
uint32_t view_count;
+ viewloc_info.viewConfigurationType = m_oxr->view_type;
viewloc_info.displayTime = m_draw_info->frame_state.predictedDisplayTime;
viewloc_info.space = m_oxr->reference_space;
@@ -510,6 +511,7 @@ bool GHOST_XrSession::isRunning() const
return false;
}
switch (m_oxr->session_state) {
+ case XR_SESSION_STATE_READY:
case XR_SESSION_STATE_SYNCHRONIZED:
case XR_SESSION_STATE_VISIBLE:
case XR_SESSION_STATE_FOCUSED:
@@ -518,19 +520,6 @@ bool GHOST_XrSession::isRunning() const
return false;
}
}
-bool GHOST_XrSession::isVisible() const
-{
- if (m_oxr->session == XR_NULL_HANDLE) {
- return false;
- }
- switch (m_oxr->session_state) {
- case XR_SESSION_STATE_VISIBLE:
- case XR_SESSION_STATE_FOCUSED:
- return true;
- default:
- return false;
- }
-}
/** \} */ /* State Queries */
diff --git a/intern/ghost/intern/GHOST_XrSession.h b/intern/ghost/intern/GHOST_XrSession.h
index ad5a54b80cc..7b75bdbae56 100644
--- a/intern/ghost/intern/GHOST_XrSession.h
+++ b/intern/ghost/intern/GHOST_XrSession.h
@@ -40,7 +40,6 @@ class GHOST_XrSession {
eLifeExpectancy handleStateChangeEvent(const struct XrEventDataSessionStateChanged *lifecycle);
bool isRunning() const;
- bool isVisible() const;
void unbindGraphicsContext(); /* public so context can ensure it's unbound as needed. */
More information about the Bf-blender-cvs
mailing list