diff options
author | Julian Eisel <eiseljulian@gmail.com> | 2019-05-28 02:17:08 +0300 |
---|---|---|
committer | Julian Eisel <eiseljulian@gmail.com> | 2019-05-28 02:21:25 +0300 |
commit | e65ba62c37c7cc5f4ab61e3b3db7140ef87e38e4 (patch) | |
tree | 4bc1d9f248ce518e55c66049477768e90b71936e /source/blender/windowmanager/intern/wm_init_exit.c | |
parent | 3022dd2b27fdfd8aca369bfb0e390965de448b7a (diff) |
Windows: OpenXR Linking via OpenXR Loader
Adds needed headers for OpenXR, the loader from the OpenXR SDK and
JsonCpp into extern. Took a while to get this to compile/link, but on
Win10 it works fine now without patching #includes. Linux probably
needs more work.
Added a compile option WITH_OPENXR to toggle XR feature compiling.
Also does a dummy xrCreateInstance() call to test linking.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_init_exit.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_init_exit.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/windowmanager/intern/wm_init_exit.c b/source/blender/windowmanager/intern/wm_init_exit.c index 04a3115992f..27f4fded6cf 100644 --- a/source/blender/windowmanager/intern/wm_init_exit.c +++ b/source/blender/windowmanager/intern/wm_init_exit.c @@ -124,6 +124,10 @@ #include "DEG_depsgraph.h" +#ifdef WITH_OPENXR +# include "openxr/openxr.h" +#endif + #include "DRW_engine.h" #ifdef WITH_OPENSUBDIV @@ -212,6 +216,13 @@ void WM_init(bContext *C, int argc, const char **argv) wm_operatortype_init(); wm_operatortypes_register(); +#ifdef WITH_OPENXR + /* Just to test OpenXR loader linking */ + XrInstance xr_instance; + XrInstanceCreateInfo xr_inst_createi = {0}; + xrCreateInstance(&xr_inst_createi, &xr_instance); +#endif + WM_paneltype_init(); /* Lookup table only. */ WM_menutype_init(); WM_uilisttype_init(); |