Skip to content

Commit e8b0148

Browse files
Small change not to #include <vulkan/vulkan.h> if it was already included (possible from a different path) before including VMA. Issue #50 Thanks @baldurk !
1 parent 3b39225 commit e8b0148

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/VmaUsage.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
#include <Windows.h>
99
#define VK_USE_PLATFORM_WIN32_KHR
1010

11-
#include <vulkan/vulkan.h>
11+
// Uncomment to test including `vulkan.h` on your own before including VMA.
12+
//#include <vulkan/vulkan.h>
1213

1314
/*
1415
In every place where you want to use Vulkan Memory Allocator, define appropriate

src/vk_mem_alloc.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1492,7 +1492,9 @@ available through VmaAllocatorCreateInfo::pRecordSettings.
14921492
#define NOMINMAX // For windows.h
14931493
#endif
14941494

1495-
#include <vulkan/vulkan.h>
1495+
#ifndef VULKAN_H_
1496+
#include <vulkan/vulkan.h>
1497+
#endif
14961498

14971499
#if VMA_RECORDING_ENABLED
14981500
#include <windows.h>

0 commit comments

Comments
 (0)