Revision b8a7b87 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 11, 2019, 14:36 (GMT) |
General minor fixes and cleanup * Initialize all class member variables * Add version to runtime name printing * Separate functionality code from debug prints * Improve code structure using Doxygen groups * Make accessors const functions * Add (Doxygen) comments * Naming * Reorder functions |
Revision c9f6c1a by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 10, 2019, 22:51 (GMT) |
Fix wrong return value causing OpenXR initialization to fail |
Revision dd0fcb5 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 10, 2019, 22:50 (GMT) |
Fix compile errors on windows and with bundled OpenXR SDK sources |
Revision c1e9cf0 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 10, 2019, 21:53 (GMT) |
Refactor GHOST_XrContext into class + interface Makes GHOST_Xr much more consistent with the rest of GHOST. Basically I added a GHOST_IXrContext interface which can be called by the GHOST C-API. The internal GHOST_XrContext class implements this. Outside of GHOST only the opaque GHOST_XrContextHandle is accessible. Kept GHOST_Xr_intern.h and GHOST_Xr.cpp for now. I'll probably remove them soon. There's not much reason for both of them to be there. |
Revision 84d609f by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 10, 2019, 13:08 (GMT) |
Use OpenXR extension for extra debug messages in debug mode Enables (or tries to) the XR_EXT_debug_utils extension which allows setting a custom callback for additional debug prints. Note that I haven't been able to test this really, as the Monado runtime appears to not have this fully implemented (had to force sending a custom message to find that out...). Will test with the Windows MR runtime in a bit. We can also improve message quality then (it can print the exact function name the message was sent from, print additional custom labels which could indicate session state, etc.). |
Revision 8617854 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 10, 2019, 13:08 (GMT) |
Only try to enable OpenXR API validation layer in debug mode |
Revision d711540 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 10, 2019, 13:06 (GMT) |
Cleanup: Rename XR_DEBUG_BEGIN -> XR_DEBUG_ONLY_BEGIN Of course also renames XR_DEBUG_END accordingly. |
Revision 6e3158c by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 9, 2019, 15:49 (GMT) |
Only print info messages with --debug-xr enabled |
Revision b216690 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 9, 2019, 15:20 (GMT) |
Add --debug-xr commandline arg and pass on to GHOST XR contexts Doesn't do anything yet. |
Revision b98896d by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 9, 2019, 14:45 (GMT) |
Preparations to allow enabling OpenXR API validation layer For this to work two environment variables have to be set: XR_API_LAYER_PATH and LD_LIBRARY_PATH, both have to point to the API layers built by the OpenXR SDK. It also requires you compile Blender linked to your own SDK build (OPENXR_USE_BUNDLED_SRC disabled). Further changes will make this set up unnecessary, so validation layers can be enabled via some flag. |
Revision a05104d by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 9, 2019, 09:28 (GMT) |
Fix warnings and compile error on GCC |
Revision 7fe1cc8 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 9, 2019, 08:56 (GMT) |
Enable grid floor in VR session Helps quite a bit orientating. |
Revision 70e84a2 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 8, 2019, 12:18 (GMT) |
Merge branch 'master' into soc-2019-openxr |
Revision 084a33c by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 8, 2019, 12:13 (GMT) |
Use base pose from Blender camera I was trying to set the camera pose as OpenXR reference pose. But then I got really strange poses for drawing back from OpenXR. Couldn't figure out a way to solve this. Now we just apply OpenXR's draw pose to the Blender camera pose. If we later want to support moving around in the scene (e.g. via teleporting), that has to be changed. Also uses flipped drawing for DirectX surface to correct DirectX upside down drawing (compared to OpenGL). |
Revision 37f619a by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 7, 2019, 11:07 (GMT) |
Don't recreate reference local space on each redraw Set this up on session start. |
Revision 6904ab1 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 7, 2019, 10:45 (GMT) |
Add GHOST_XrSession class for cleaner & safer session management Session code and data structures are now localized. But also, this enables sessions to use deterministic destruction to end itself cleanly. So whenever an error occurs, we can use stack unwinding which will cause graceful ending of the session. |
Revision 146ef0d by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 3, 2019, 19:01 (GMT) |
Properly end VR sessions fixing crash on next session start Previously, you had to restart Blender to start another session. |
Revision 5891e86 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 1, 2019, 17:04 (GMT) |
Cleanup GHOST_Xr types and functions * Move GHOST_Xr types to GHOST_Types.h * Add GHOST_XrPose. We'll have to pass around pose data at multiple places. * Don't require extra call to prepare session rendering, handle everything through GHOST_XrSessionStart * Naming |
Revision 2cedad9 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) July 1, 2019, 13:57 (GMT) |
Initial HMD viewport rendering (DirectX only first) Finally: This makes it possible to render a viewport to an HMD via OpenXR. Pure OpenGL rendering will need some more tweaks to work. To my great delight, performance is quite good for reasonably sized scenes. Had to do some hacks and marked some TODOs. Nothing too bad though. Here are a couple of notes: * Current initial pose is pretty useless, think it just looks downwards from world origin. Will change that soon. * The rendered viewport has some issues: Too dark (bad lighting?), grid doesn't show up even though I told it to, lighting seems to change with view position/rotation, etc. Needs some polish. * Ideally we'd just use the D3D11 Texture given to us via the OpenXR swapchain and blit the OpenGL framebuffer into that. However the NV_DX_interop extension fails doing this. Seems like this is a NVidia Optimus only issue, but I'm missing the hardware to confirm. So instead, we blit into the D3D11 back buffer first and then into the Texture. * The draw-manager uses its own offscreen context so we have to get the render result from the draw-manager context to the VR session's context first. Luckily I've already added code to support blitting from one OpenGL context into another. But it requires blitting twice. Blitting should be very cheap, but still... Draw-manager could get a context to use passed instead. |
Revision 109be29 by Julian Eisel (soc-2019-openxr, temp-vr-draw-thread, vamr-openxr-module, vr_scene_inspection) June 29, 2019, 00:30 (GMT) |
Draw offscreen viewport in XR session surface callback Not visible yet, but it should draw in the offscreen. The way this is now, we don't depend on the Window->Workspace->bScreen->... chain. We simply draw an offscreen viewport in the draw callback of the XR session surface. The drawing also uses view and projection matrices from OpenXR (or calculated from OpenXR data). |
|