[Bf-blender-cvs] [e9ea8142331] soc-2019-openxr: Merge branch 'master' into soc-2019-openxr
Julian Eisel
noreply at git.blender.org
Mon Jun 24 12:54:13 CEST 2019
Commit: e9ea8142331bcd1f87b3a6330b8b5e63c38cd6c8
Author: Julian Eisel
Date: Mon Jun 24 12:52:37 2019 +0200
Branches: soc-2019-openxr
https://developer.blender.org/rBe9ea8142331bcd1f87b3a6330b8b5e63c38cd6c8
Merge branch 'master' into soc-2019-openxr
===================================================================
===================================================================
diff --cc source/blender/windowmanager/intern/wm_window.c
index 4cbb56ec289,7558468c3b5..cd636bbe4a3
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@@ -1947,22 -1913,14 +1977,28 @@@ void wm_window_raise(wmWindow *win
GHOST_SetWindowOrder(win->ghostwin, GHOST_kWindowOrderTop);
}
+ /** \} */
+
+ /* -------------------------------------------------------------------- */
+ /** \name Window Buffers
+ * \{ */
+
-void wm_window_swap_buffers(wmWindow *win)
+/**
+ * \brief Push rendered buffer to the screen.
+ * In most cases, just swaps the buffer. However a window offscreen context may have been used to
+ * inject a layer of control in-between the OpenGL context and the window. We use this to support
+ * drawing with OpenGL into a DirectX window for the rare cases we need this (Windows Mixed
+ * Reality OpenXR runtime, which doesn't support OpenGL).
+ */
+void wm_window_present(wmWindow *win)
{
+ if (win->offscreen_context) {
+ /* The window may be a non-OpenGL window (unlikely though). In that case it's given the
+ * chance to blit the offscreen buffer to its onscreen context. Just a simple interop
+ * layer. */
+ GHOST_BlitOpenGLOffscreenContext(win->ghostwin, win->offscreen_context);
+ GHOST_SwapContextBuffers(win->offscreen_context);
+ }
GHOST_SwapWindowBuffers(win->ghostwin);
}
More information about the Bf-blender-cvs
mailing list