Fixed #include of DXGI header

Fixes #13
This commit is contained in:
Adam Sawicki 2021-03-10 14:15:25 +01:00
parent e7e5c2a4fe
commit ff55a25199

View File

@ -637,6 +637,13 @@ Features deliberately excluded from the scope of this library:
are not going to be included into this repository.
*/
// 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 <d3d12.h>
#include <dxgi1_4.h>
#endif
// Define this macro to 0 to disable usage of DXGI 1.4 (needed for IDXGIAdapter3 and query for memory budget).
#ifndef D3D12MA_DXGI_1_4
#ifdef __IDXGIAdapter3_INTERFACE_DEFINED__
@ -646,13 +653,6 @@ Features deliberately excluded from the scope of this library:
#endif
#endif
// If using this library on a platform different than Windows PC, you should
// include D3D12-compatible header before this library on your own and define this macro.
#ifndef D3D12MA_D3D12_HEADERS_ALREADY_INCLUDED
#include <d3d12.h>
#include <dxgi.h>
#endif
/*
When defined to value other than 0, the library will try to use
D3D12_SMALL_RESOURCE_PLACEMENT_ALIGNMENT or D3D12_SMALL_MSAA_RESOURCE_PLACEMENT_ALIGNMENT