[Bf-blender-cvs] [10d563baf4f] soc-2019-openxr: Add XR_ prefix like now in master
Julian Eisel
noreply at git.blender.org
Thu Mar 5 12:47:03 CET 2020
Commit: 10d563baf4fcbd4505c539fe8f07776350a42c8b
Author: Julian Eisel
Date: Thu Mar 5 12:36:40 2020 +0100
Branches: soc-2019-openxr
https://developer.blender.org/rB10d563baf4fcbd4505c539fe8f07776350a42c8b
Add XR_ prefix like now in master
===================================================================
M intern/ghost/CMakeLists.txt
M source/blender/blenkernel/CMakeLists.txt
M source/blender/blenloader/CMakeLists.txt
M source/blender/makesdna/DNA_windowmanager_types.h
M source/blender/windowmanager/CMakeLists.txt
M source/blender/windowmanager/intern/wm.c
M source/blender/windowmanager/intern/wm_operators.c
M source/blender/windowmanager/intern/wm_window.c
M source/blender/windowmanager/wm.h
M source/creator/CMakeLists.txt
M source/creator/creator_args.c
===================================================================
diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt
index e5e914081fc..c09d798dd92 100644
--- a/intern/ghost/CMakeLists.txt
+++ b/intern/ghost/CMakeLists.txt
@@ -376,7 +376,7 @@ if(WITH_XR_OPENXR)
${XR_OPENXR_SDK_INCLUDE_DIR}
)
list(APPEND LIB
- ${OPENXR_SDK_LIBRARIES}
+ ${XR_OPENXR_SDK_LIBRARIES}
)
set(XR_PLATFORM_DEFINES -DXR_USE_GRAPHICS_API_OPENGL)
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index f53f8c501e9..42013f0b4a8 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -660,8 +660,8 @@ if(WITH_TBB)
)
endif()
-if(WITH_OPENXR)
- add_definitions(-DWITH_OPENXR)
+if(WITH_XR_OPENXR)
+ add_definitions(-DWITH_XR_OPENXR)
endif()
# # Warnings as errors, this is too strict!
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 5334f4bdbdc..5e7767e581b 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -92,8 +92,8 @@ if(WITH_ALEMBIC)
add_definitions(-DWITH_ALEMBIC)
endif()
-if(WITH_OPENXR)
- add_definitions(-DWITH_OPENXR)
+if(WITH_XR_OPENXR)
+ add_definitions(-DWITH_XR_OPENXR)
endif()
blender_add_lib(bf_blenloader "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/makesdna/DNA_windowmanager_types.h b/source/blender/makesdna/DNA_windowmanager_types.h
index f5e874d331c..57e7a25439f 100644
--- a/source/blender/makesdna/DNA_windowmanager_types.h
+++ b/source/blender/makesdna/DNA_windowmanager_types.h
@@ -121,7 +121,7 @@ typedef struct ReportTimerInfo {
float widthfac;
} ReportTimerInfo;
-//#ifdef WITH_OPENXR
+//#ifdef WITH_XR_OPENXR
typedef struct wmXrData {
void *context; /* GHOST_XrContextHandle */
@@ -190,7 +190,7 @@ typedef struct wmWindowManager {
struct wmMsgBus *message_bus;
- //#ifdef WITH_OPENXR
+ //#ifdef WITH_XR_OPENXR
wmXrData xr;
//#endif
} wmWindowManager;
diff --git a/source/blender/windowmanager/CMakeLists.txt b/source/blender/windowmanager/CMakeLists.txt
index ce9513998fe..a1b67216f1a 100644
--- a/source/blender/windowmanager/CMakeLists.txt
+++ b/source/blender/windowmanager/CMakeLists.txt
@@ -189,8 +189,8 @@ if(WITH_COMPOSITOR)
add_definitions(-DWITH_COMPOSITOR)
endif()
-if(WITH_OPENXR)
- add_definitions(-DWITH_OPENXR)
+if(WITH_XR_OPENXR)
+ add_definitions(-DWITH_XR_OPENXR)
list(APPEND SRC
intern/wm_xr.c
)
diff --git a/source/blender/windowmanager/intern/wm.c b/source/blender/windowmanager/intern/wm.c
index 8f283f7b2b6..8f1289d3561 100644
--- a/source/blender/windowmanager/intern/wm.c
+++ b/source/blender/windowmanager/intern/wm.c
@@ -375,7 +375,7 @@ void wm_close_and_free(bContext *C, wmWindowManager *wm)
WM_msgbus_destroy(wm->message_bus);
}
-#ifdef WITH_OPENXR
+#ifdef WITH_XR_OPENXR
wm_xr_context_destroy(wm);
#endif
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index deff1751d9d..10366d1f974 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -3645,7 +3645,7 @@ static void WM_OT_stereo3d_set(wmOperatorType *ot)
/** \} */
-#ifdef WITH_OPENXR
+#ifdef WITH_XR_OPENXR
static int wm_xr_session_toggle_exec(bContext *C, wmOperator *UNUSED(op))
{
wmWindowManager *wm = CTX_wm_manager(C);
@@ -3676,7 +3676,7 @@ static void WM_OT_xr_session_toggle(wmOperatorType *ot)
* UI instead. Not meant as a permanent solution. */
ot->flag = OPTYPE_INTERNAL;
}
-#endif /* WITH_OPENXR */
+#endif /* WITH_XR_OPENXR */
/* -------------------------------------------------------------------- */
/** \name Operator Registration & Keymaps
@@ -3719,7 +3719,7 @@ void wm_operatortypes_register(void)
WM_operatortype_append(WM_OT_call_panel);
WM_operatortype_append(WM_OT_radial_control);
WM_operatortype_append(WM_OT_stereo3d_set);
-#ifdef WITH_OPENXR
+#ifdef WITH_XR_OPENXR
WM_operatortype_append(WM_OT_xr_session_toggle);
#endif
#if defined(WIN32)
diff --git a/source/blender/windowmanager/intern/wm_window.c b/source/blender/windowmanager/intern/wm_window.c
index ec4c821aee7..2d550d33254 100644
--- a/source/blender/windowmanager/intern/wm_window.c
+++ b/source/blender/windowmanager/intern/wm_window.c
@@ -1630,7 +1630,7 @@ void wm_window_process_events(const bContext *C)
GHOST_DispatchEvents(g_system);
}
hasevent |= wm_window_timer(C);
-#ifdef WITH_OPENXR
+#ifdef WITH_XR_OPENXR
hasevent |= GHOST_XrEventsHandle(CTX_wm_manager(C)->xr.context);
#endif
diff --git a/source/blender/windowmanager/wm.h b/source/blender/windowmanager/wm.h
index a75fcd3c6c0..9c7666647f3 100644
--- a/source/blender/windowmanager/wm.h
+++ b/source/blender/windowmanager/wm.h
@@ -102,7 +102,7 @@ void wm_open_init_use_scripts(wmOperator *op, bool use_prefs);
/* wm_draw.c */
void wm_draw_offscreen_texture_parameters(struct GPUOffScreen *offscreen);
-#ifdef WITH_OPENXR
+#ifdef WITH_XR_OPENXR
/* wm_xr.c */
bool wm_xr_context_ensure(bContext *C, wmWindowManager *wm);
void wm_xr_context_destroy(wmWindowManager *wm);
diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt
index eb177a2dc7e..bbef3a4d52a 100644
--- a/source/creator/CMakeLists.txt
+++ b/source/creator/CMakeLists.txt
@@ -111,8 +111,8 @@ if(WITH_FREESTYLE)
add_definitions(-DWITH_FREESTYLE)
endif()
-if(WITH_OPENXR)
- add_definitions(-DWITH_OPENXR)
+if(WITH_XR_OPENXR)
+ add_definitions(-DWITH_XR_OPENXR)
endif()
# Setup the exe sources and buildinfo
diff --git a/source/creator/creator_args.c b/source/creator/creator_args.c
index bdcf56b499c..565cf60d2e1 100644
--- a/source/creator/creator_args.c
+++ b/source/creator/creator_args.c
@@ -603,7 +603,7 @@ static int arg_handle_print_help(int UNUSED(argc), const char **UNUSED(argv), vo
BLI_argsPrintArgDoc(ba, "--debug-gpu-shaders");
BLI_argsPrintArgDoc(ba, "--debug-gpu-force-workarounds");
BLI_argsPrintArgDoc(ba, "--debug-wm");
-# ifdef WITH_OPENXR
+# ifdef WITH_XR_OPENXR
BLI_argsPrintArgDoc(ba, "--debug-xr");
BLI_argsPrintArgDoc(ba, "--debug-xr-time");
# endif
@@ -944,7 +944,7 @@ static const char arg_handle_debug_mode_generic_set_doc_wm[] =
"\n\t"
"Enable debug messages for the window manager, shows all operators in search, shows "
"keymap errors.";
-# ifdef WITH_OPENXR
+# ifdef WITH_XR_OPENXR
static const char arg_handle_debug_mode_generic_set_doc_xr[] =
"\n\t"
"Enable debug messages for virtual reality contexts.\n"
@@ -2105,7 +2105,7 @@ void main_args_setup(bContext *C, bArgs *ba)
(void *)G_DEBUG_HANDLERS);
BLI_argsAdd(
ba, 1, NULL, "--debug-wm", CB_EX(arg_handle_debug_mode_generic_set, wm), (void *)G_DEBUG_WM);
-# ifdef WITH_OPENXR
+# ifdef WITH_XR_OPENXR
BLI_argsAdd(
ba, 1, NULL, "--debug-xr", CB_EX(arg_handle_debug_mode_generic_set, xr), (void *)G_DEBUG_XR);
BLI_argsAdd(ba,
More information about the Bf-blender-cvs
mailing list