diff --git a/client/include/render.h b/client/include/render.h index fdad0f3..d9d1bbf 100644 --- a/client/include/render.h +++ b/client/include/render.h @@ -8,7 +8,11 @@ #define GLFW_INCLUDE_VULKAN #include + +#ifdef __APPLE__ #define GLFW_EXPOSE_NATIVE_COCOA +#endif + #include #define GLM_FORCE_RADIANS diff --git a/client/src/main.c b/client/src/main.c index 0cd8dfc..0cf9f69 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1,4 +1,5 @@ #include "render.h" +#include "arpa/inet.h" #include "pipeline.h" #include "vk_mem_alloc.h" #include "vulkan/vk_enum_string_helper.h" diff --git a/client/src/render.c b/client/src/render.c index 58c3cac..5d27833 100644 --- a/client/src/render.c +++ b/client/src/render.c @@ -1,4 +1,6 @@ #include "render.h" +#include "stdio.h" +#include "string.h" #include "pipeline.h" #include "vk_mem_alloc.h" #include "vulkan/vulkan_core.h" @@ -17,7 +19,6 @@ const char * instance_extensions[] = { VK_KHR_PORTABILITY_ENUMERATION_EXTENSION_NAME, VK_EXT_DEBUG_UTILS_EXTENSION_NAME, VK_EXT_DEBUG_REPORT_EXTENSION_NAME, - "VK_EXT_metal_surface", VK_KHR_SURFACE_EXTENSION_NAME, }; uint32_t instance_extension_count = sizeof(instance_extensions) / sizeof(const char *); @@ -25,7 +26,6 @@ uint32_t instance_extension_count = sizeof(instance_extensions) / sizeof(const c const char * device_extensions[] = { VK_KHR_SWAPCHAIN_EXTENSION_NAME, VK_EXT_DESCRIPTOR_INDEXING_EXTENSION_NAME, - "VK_KHR_portability_subset", }; uint32_t device_extension_count = sizeof(device_extensions) / sizeof(const char *); @@ -65,6 +65,7 @@ bool check_validation_layers(const char ** layers, uint32_t num_layers) { VkLayerProperties* available_layers = malloc(sizeof(VkLayerProperties)*layer_count); result = vkEnumerateInstanceLayerProperties(&layer_count, available_layers); + for(uint32_t i = 0; i < num_layers; i++) { bool found = false; for(uint32_t j = 0; j < layer_count; j++) { @@ -74,6 +75,7 @@ bool check_validation_layers(const char ** layers, uint32_t num_layers) { } if(found == false) { free(available_layers); + fprintf(stderr, "Failed to find layer %s\n", layers[i]); return false; } }