From: Florian Zwoch Date: Mon, 7 Jun 2021 09:13:50 +0000 (+0200) Subject: compile fixes for macOS X-Git-Tag: v0.2.0~72 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=6db320f592827042559dac030904a4653b848ffc;p=jp%2Fvkvg.git compile fixes for macOS Note that running it will not work due to missing MoltenVK/Metal support of VK_PRIMITIVE_TOPOLOGY_TRIANGLE_FAN. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 857f4d5..a4eea8e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.12) SET(LANG "CXX") +SET(CMAKE_CXX_STANDARD 11) #PROJECT(vkvg VERSION 0.1.1 DESCRIPTION "Vulkan Vector Graphic" LANGUAGES ${LANG}) PROJECT(vkvg VERSION 0.1.1 DESCRIPTION "Vulkan Vector Graphic") diff --git a/src/cross_mutex.h b/src/cross_mutex.h index b42c488..11635a7 100644 --- a/src/cross_mutex.h +++ b/src/cross_mutex.h @@ -28,6 +28,8 @@ #include "process.h" #define MUTEX HANDLE #elif __APPLE__ +#include "pthread.h" +#define MUTEX pthread_mutex_t #elif __unix__ #include "pthread.h" #define MUTEX pthread_mutex_t diff --git a/src/cross_os.h b/src/cross_os.h index 842a549..916aa12 100644 --- a/src/cross_os.h +++ b/src/cross_os.h @@ -29,6 +29,8 @@ #include "windows.h" #define isnanf _isnanf #elif __APPLE__ + #include + #define isnanf isnan #elif __unix__ #include #include diff --git a/src/vkvg_device_internal.h b/src/vkvg_device_internal.h index ea14831..ccd5917 100644 --- a/src/vkvg_device_internal.h +++ b/src/vkvg_device_internal.h @@ -105,6 +105,7 @@ typedef struct _vkvg_device_t{ bool _init_function_pointers (VkvgDevice dev); void _create_empty_texture (VkvgDevice dev, VkFormat format, VkImageTiling tiling); void _get_best_image_tiling (VkvgDevice dev, VkFormat format, VkImageTiling* pTiling); +void _check_best_image_tiling (VkvgDevice dev, VkFormat format); void _create_pipeline_cache (VkvgDevice dev); VkRenderPass _createRenderPassMS(VkvgDevice dev, VkAttachmentLoadOp loadOp, VkAttachmentLoadOp stencilLoadOp); VkRenderPass _createRenderPassNoResolve(VkvgDevice dev, VkAttachmentLoadOp loadOp, VkAttachmentLoadOp stencilLoadOp);