Fix compile/CMake errors and warnings on Linux
authorJulian Eisel <eiseljulian@gmail.com>
Thu, 27 Jun 2019 17:54:05 +0000 (19:54 +0200)
committerJulian Eisel <eiseljulian@gmail.com>
Thu, 27 Jun 2019 17:55:22 +0000 (19:55 +0200)
intern/ghost/intern/GHOST_IXrGraphicsBinding.h [moved from intern/ghost/intern/GHOST_IXRGraphicsBinding.h with 92% similarity]
intern/ghost/intern/GHOST_Xr.cpp [moved from intern/ghost/intern/GHOST_XR.cpp with 99% similarity]
intern/ghost/intern/GHOST_XrEvent.cpp [moved from intern/ghost/intern/GHOST_XREvent.cpp with 98% similarity]
intern/ghost/intern/GHOST_XrGraphicsBinding.cpp [moved from intern/ghost/intern/GHOST_XRGraphicsBinding.cpp with 92% similarity]
intern/ghost/intern/GHOST_XrSession.cpp [moved from intern/ghost/intern/GHOST_XRSession.cpp with 98% similarity]
intern/ghost/intern/GHOST_Xr_intern.h [moved from intern/ghost/intern/GHOST_XR_intern.h with 97% similarity]
intern/ghost/intern/GHOST_Xr_openxr_includes.h [moved from intern/ghost/intern/GHOST_XR_openxr_includes.h with 100% similarity]
release/scripts/addons
source/blender/windowmanager/intern/wm_xr.c
source/tools

similarity index 92%
rename from intern/ghost/intern/GHOST_IXRGraphicsBinding.h
rename to intern/ghost/intern/GHOST_IXrGraphicsBinding.h
index 60b2304b2394879efdb2ce1a49c8ac950376001d..6bb53b3b6baa53aef0d82f6341f5bad6d58b03f6 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <memory>
 #include <vector>
-#include "GHOST_XR_openxr_includes.h"
+#include "GHOST_Xr_openxr_includes.h"
 
 class GHOST_IXrGraphicsBinding {
   friend std::unique_ptr<GHOST_IXrGraphicsBinding> GHOST_XrGraphicsBindingCreateFromType(
@@ -52,4 +52,7 @@ class GHOST_IXrGraphicsBinding {
   GHOST_IXrGraphicsBinding() = default;
 };
 
+std::unique_ptr<GHOST_IXrGraphicsBinding> GHOST_XrGraphicsBindingCreateFromType(
+    GHOST_TXrGraphicsBinding type);
+
 #endif /* __GHOST_IXRGRAPHICSBINDING_H__ */
similarity index 99%
rename from intern/ghost/intern/GHOST_XR.cpp
rename to intern/ghost/intern/GHOST_Xr.cpp
index 633de1dde16f6326cc1756aea7d94c52f058b264..9e77443edb0b034d21ba4c69b6e18c1aaf4eb888 100644 (file)
@@ -25,7 +25,7 @@
 
 #include "GHOST_C-api.h"
 
-#include "GHOST_XR_intern.h"
+#include "GHOST_Xr_intern.h"
 
 /* Toggle printing of available OpenXR extensions and API-layers. Should probably be changed to use
  * CLOG at some point */
similarity index 98%
rename from intern/ghost/intern/GHOST_XREvent.cpp
rename to intern/ghost/intern/GHOST_XrEvent.cpp
index 6d53d5b6adb5766ad19fbf44b7c2547b27399120..b3ea35194f762b1b150476ed1165efdb1a91c3c3 100644 (file)
@@ -21,7 +21,7 @@
 #include <iostream>
 
 #include "GHOST_C-api.h"
-#include "GHOST_XR_intern.h"
+#include "GHOST_Xr_intern.h"
 
 static bool GHOST_XrEventPollNext(OpenXRData *oxr, XrEventDataBuffer &r_event_data)
 {
similarity index 92%
rename from intern/ghost/intern/GHOST_XRGraphicsBinding.cpp
rename to intern/ghost/intern/GHOST_XrGraphicsBinding.cpp
index ee1655a21509f1c45415a2d4a4cb52288ad9ac26..22f5e80c7ca4ab6025001290342d8cc0ad4a2f3a 100644 (file)
 #  include "GHOST_ContextD3D.h"
 #endif
 #include "GHOST_C-api.h"
-#include "GHOST_XR_intern.h"
+#include "GHOST_Xr_intern.h"
 
-#include "GHOST_IXRGraphicsBinding.h"
+#include "GHOST_IXrGraphicsBinding.h"
 
-bool choose_swapchain_format_from_candidates(std::vector<int64_t> gpu_binding_formats,
-                                             std::vector<int64_t> runtime_formats,
-                                             int64_t *r_result)
+static bool choose_swapchain_format_from_candidates(std::vector<int64_t> gpu_binding_formats,
+                                                    std::vector<int64_t> runtime_formats,
+                                                    int64_t *r_result)
 {
   if (gpu_binding_formats.empty()) {
     return false;
@@ -161,9 +161,8 @@ class GHOST_XrGraphicsBindingD3D : public GHOST_IXrGraphicsBinding {
     const CD3D11_RENDER_TARGET_VIEW_DESC render_target_view_desc(D3D11_RTV_DIMENSION_TEXTURE2D,
                                                                  DXGI_FORMAT_R8G8B8A8_UNORM);
     ID3D11RenderTargetView *render_target_view;
-    m_ghost_ctx->m_device->CreateRenderTargetView(d3d_swapchain_image->texture,
-                                                  &render_target_view_desc,
-                                                  &render_target_view);
+    m_ghost_ctx->m_device->CreateRenderTargetView(
+        d3d_swapchain_image->texture, &render_target_view_desc, &render_target_view);
 
     const float clear_col[] = {0.2f, 0.5f, 0.8f, 1.0f};
     m_ghost_ctx->m_device_ctx->ClearRenderTargetView(render_target_view, clear_col);
similarity index 98%
rename from intern/ghost/intern/GHOST_XRSession.cpp
rename to intern/ghost/intern/GHOST_XrSession.cpp
index be7a784992979cb17fb6917f7d3b086c79bb71aa..9040026cfa8ad6578f08c2ac1998376070ee8f91 100644 (file)
@@ -24,9 +24,9 @@
 
 #include "GHOST_C-api.h"
 
-#include "GHOST_IXRGraphicsBinding.h"
+#include "GHOST_IXrGraphicsBinding.h"
 
-#include "GHOST_XR_intern.h"
+#include "GHOST_Xr_intern.h"
 
 GHOST_TSuccess GHOST_XrSessionIsRunning(const GHOST_XrContext *xr_context)
 {
@@ -227,7 +227,8 @@ static void drawing_begin(GHOST_XrContext *xr_context)
   xr_context->draw_frame->frame_state = frame_state;
 }
 
-void drawing_end(GHOST_XrContext *xr_context, std::vector<XrCompositionLayerBaseHeader *> *layers)
+static void drawing_end(GHOST_XrContext *xr_context,
+                        std::vector<XrCompositionLayerBaseHeader *> *layers)
 {
   XrFrameEndInfo end_info{XR_TYPE_FRAME_END_INFO};
 
similarity index 97%
rename from intern/ghost/intern/GHOST_XR_intern.h
rename to intern/ghost/intern/GHOST_Xr_intern.h
index 83205ec28ddf94782b34d02ef8e53c18fc0c6854..fb7ee92ba1463f7cf7f28dad69e21c24228d2966 100644 (file)
@@ -25,8 +25,8 @@
 #include <memory>
 #include <vector>
 
-#include "GHOST_XR_openxr_includes.h"
-#include "GHOST_IXRGraphicsBinding.h"
+#include "GHOST_Xr_openxr_includes.h"
+#include "GHOST_IXrGraphicsBinding.h"
 
 typedef struct OpenXRData {
   XrInstance instance;
index 0e53a9a38672790d5fbb9a1d4a935980824d4a84..3687f02a662d6c258cb72e36127cff1fb7fe3236 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0e53a9a38672790d5fbb9a1d4a935980824d4a84
+Subproject commit 3687f02a662d6c258cb72e36127cff1fb7fe3236
index 5a07a3b46e6aff9c2344f2c867b2d32f66bbdc94..3a6f181eafa1c3dba023ba9ea4b6b5b53f664111 100644 (file)
 
 #include "GHOST_C-api.h"
 
+#include "WM_types.h"
+#include "WM_api.h"
+
+#include "wm.h"
 
 void wm_xr_session_draw(bContext *C, struct GHOST_XrContext *xr_context)
 {
index eb406b701d5a251818e425fec489417477019d61..281c63156c61573a10a6197a149cde00debbf675 160000 (submodule)
@@ -1 +1 @@
-Subproject commit eb406b701d5a251818e425fec489417477019d61
+Subproject commit 281c63156c61573a10a6197a149cde00debbf675