From 7234846ff5f668bfbd62d111daa29d958396780b Mon Sep 17 00:00:00 2001 From: Carsten Rudolph <18394207+crud89@users.noreply.github.com> Date: Tue, 4 Apr 2023 17:16:47 +0200 Subject: [PATCH 1/2] Support using open-sourced DirectX headers. --- include/D3D12MemAlloc.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/D3D12MemAlloc.h b/include/D3D12MemAlloc.h index 7ebcf98..6b11a99 100644 --- a/include/D3D12MemAlloc.h +++ b/include/D3D12MemAlloc.h @@ -61,7 +61,13 @@ Documentation of all members: D3D12MemAlloc.h // If using this library on a platform different than Windows PC or want to use different version of DXGI, // you should include D3D12-compatible headers before this library on your own and define this macro. #ifndef D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED - #include + #if defined(USING_DIRECTX_HEADERS) + #include + #include + #else + #include + #endif + #include #endif From 9c8c799fcff7485dd1a285e58515672f5dace34b Mon Sep 17 00:00:00 2001 From: Carsten Rudolph <18394207+crud89@users.noreply.github.com> Date: Wed, 12 Apr 2023 15:30:05 +0200 Subject: [PATCH 2/2] Update prefix and documentation. --- include/D3D12MemAlloc.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/include/D3D12MemAlloc.h b/include/D3D12MemAlloc.h index 6b11a99..4bf64ee 100644 --- a/include/D3D12MemAlloc.h +++ b/include/D3D12MemAlloc.h @@ -59,9 +59,12 @@ Documentation of all members: D3D12MemAlloc.h */ // If using this library on a platform different than Windows PC or want to use different version of DXGI, -// you should include D3D12-compatible headers before this library on your own and define this macro. +// you should include D3D12-compatible headers before this library on your own and define +// D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED. +// Alternatively, if you are targeting the open sourced DirectX headers, defining D3D12MA_USING_DIRECTX_HEADERS +// will include them rather the ones provided by the Windows SDK. #ifndef D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED - #if defined(USING_DIRECTX_HEADERS) + #if defined(D3D12MA_USING_DIRECTX_HEADERS) #include #include #else