From e8b01485ce088126dc148fb5c906e31ec45fb732 Mon Sep 17 00:00:00 2001 From: Adam Sawicki Date: Thu, 6 Dec 2018 14:47:59 +0100 Subject: [PATCH] Small change not to #include if it was already included (possible from a different path) before including VMA. Issue #50 Thanks @baldurk ! --- src/VmaUsage.h | 3 ++- src/vk_mem_alloc.h | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/VmaUsage.h b/src/VmaUsage.h index bd31938..9d24b96 100644 --- a/src/VmaUsage.h +++ b/src/VmaUsage.h @@ -8,7 +8,8 @@ #include #define VK_USE_PLATFORM_WIN32_KHR -#include +// Uncomment to test including `vulkan.h` on your own before including VMA. +//#include /* In every place where you want to use Vulkan Memory Allocator, define appropriate diff --git a/src/vk_mem_alloc.h b/src/vk_mem_alloc.h index 56b2624..310a4b1 100644 --- a/src/vk_mem_alloc.h +++ b/src/vk_mem_alloc.h @@ -1492,7 +1492,9 @@ available through VmaAllocatorCreateInfo::pRecordSettings. #define NOMINMAX // For windows.h #endif -#include +#ifndef VULKAN_H_ + #include +#endif #if VMA_RECORDING_ENABLED #include