Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulian Eisel <eiseljulian@gmail.com>2019-06-23 19:07:46 +0300
committerJulian Eisel <eiseljulian@gmail.com>2019-06-23 19:27:24 +0300
commit6b43c82cb516c941d1a98b10a1a8e51d448433ea (patch)
tree90f71b974323887b4a37bd31d3dc413c4b788282 /source/blender/windowmanager/intern/wm_xr.c
parentafbb62fecda14dd7d096cd17876cd82dd68fa9b8 (diff)
Set up OpenXR views and spaces for drawing
Using a dummy identity pose at {0, 0, 0} to start with. This should later use the current viewport position & orientation I guess. Also adds function to set a draw callback. There's quite some OpenXR related stuff to be done before and after drawing anyting, as well as before and after drawing each view (eye). Quite some info would have to be exposed to WM to let it manage drawing. So I think using a callback called from GHOST_Xr to draw each eye instead is a good way to go. VR session currently crashes after opening. Seems to be related to blocking frame wait call. I'm not too worried about that though, might disappear once OpenXR frame sync functions get proper timing info passed.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_xr.c')
-rw-r--r--source/blender/windowmanager/intern/wm_xr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/windowmanager/intern/wm_xr.c b/source/blender/windowmanager/intern/wm_xr.c
index c9fd9b164c1..c53e021d5f6 100644
--- a/source/blender/windowmanager/intern/wm_xr.c
+++ b/source/blender/windowmanager/intern/wm_xr.c
@@ -25,9 +25,8 @@ void wm_xr_session_draw(struct GHOST_XrContext *xr_context)
if (!GHOST_XrSessionIsRunning(xr_context)) {
return;
}
-
GHOST_XrSessionBeginDrawing(xr_context);
- /* TODO execute drawcall. Something like this? */
- // ED_XR_view_draw();
+ // TODO session visible?
+ GHOST_XrSessionDrawViews(xr_context);
GHOST_XrSessionEndDrawing(xr_context);
}