Blender Git Commit Log

Git Commits -> Revision 637b803

June 16, 2019, 19:05 (GMT)
Support drawing the VR view into a DirectX window!

Phew! That a fight. But this is also a pretty important feature as it
allows interfacing with Windows Mixed Reality OpenXR runtime and the
HMDs supported by it.

Important remaining issue: The rendered viewport is upside down :) That
is of course because DirectX has the opposite vertical direction than
OpenGL.

When creating a DirectX window, we also create an OpenGL offscreen
context to use for all drawing. Just before swapping framebuffers, the
DirectX window blits the framebuffer of the offscreen context into its
swapchain. This requires the WGL_NV_DX_interop and WGL_NV_DX_interop2
extensions.

For testing/dev purposes, also adds:
* Version of the offscreen to onscreen blitting that's OpenGL only. So
it blits the default framebuffer of the offscreen context into the one
of the onscreen context.
This is disabled by a #define.
* Code to draw a colored triangle using DirectX, also for testing.
Requires the D3DCompiler.lib to be available at compile time. This is
also disabled using a #define.

Commit Details:

Full Hash: 637b803b975547ccec4b598975bc27d27b8e4ec6
Parent Commit: 314eef0
Lines Changed: +426, -27

18 Modified Paths:

/intern/ghost/GHOST_C-api.h (+7, -0) (Diff)
/intern/ghost/GHOST_IContext.h (+2, -0) (Diff)
/intern/ghost/intern/GHOST_C-api.cpp (+7, -0) (Diff)
/intern/ghost/intern/GHOST_Context.cpp (+62, -0) (Diff)
/intern/ghost/intern/GHOST_Context.h (+15, -3) (Diff)
/intern/ghost/intern/GHOST_ContextCGL.mm (+1, -1) (Diff)
/intern/ghost/intern/GHOST_ContextD3D.cpp (+262, -6) (Diff)
/intern/ghost/intern/GHOST_ContextD3D.h (+9, -3) (Diff)
/intern/ghost/intern/GHOST_ContextEGL.cpp (+1, -1) (Diff)
/intern/ghost/intern/GHOST_ContextGLX.cpp (+1, -1) (Diff)
/intern/ghost/intern/GHOST_ContextNone.h (+2, -1) (Diff)
/intern/ghost/intern/GHOST_ContextSDL.cpp (+1, -1) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.cpp (+24, -1) (Diff)
/intern/ghost/intern/GHOST_ContextWGL.h (+2, -0) (Diff)
/intern/ghost/intern/GHOST_SystemWin32.cpp (+4, -4) (Diff)
/intern/ghost/intern/GHOST_Window.cpp (+6, -1) (Diff)
/source/blender/windowmanager/intern/wm_operators.c (+1, -0) (Diff)
/source/blender/windowmanager/intern/wm_window.c (+19, -4) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021