Skip to content

Commit

Permalink
[UWP] Fix missing DXGI header in D3D11 backend for UWP.
Browse files Browse the repository at this point in the history
UWP target platform must include <dxgi1_2.h> and <dxgi1_3.h> independently of LLGL_D3D11_ENABLE_FEATURELEVEL.
  • Loading branch information
LukasBanana committed Jun 10, 2024
1 parent 525551e commit 73f89cc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions sources/Renderer/Direct3D11/D3D11RenderSystem.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@
#include "Direct3D11.h"

#if LLGL_D3D11_ENABLE_FEATURELEVEL >= 3
#include <dxgi1_5.h>
# include <dxgi1_5.h>
#elif defined LLGL_OS_UWP
# include <dxgi1_3.h>
#endif


Expand Down Expand Up @@ -130,11 +132,11 @@ class D3D11RenderSystem final : public RenderSystem

ComPtr<IDXGIFactory> factory_;

#if LLGL_D3D11_ENABLE_FEATURELEVEL >= 1
#if LLGL_D3D11_ENABLE_FEATURELEVEL >= 1 || defined LLGL_OS_UWP
ComPtr<IDXGIFactory1> factory1_;
#endif

#if LLGL_D3D11_ENABLE_FEATURELEVEL >= 2
#if LLGL_D3D11_ENABLE_FEATURELEVEL >= 2 || defined LLGL_OS_UWP
ComPtr<IDXGIFactory2> factory2_;
#endif

Expand Down
2 changes: 1 addition & 1 deletion sources/Renderer/Direct3D11/D3D11SwapChain.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <d3d11.h>
#include <dxgi.h>

#if LLGL_D3D11_ENABLE_FEATURELEVEL >= 3
#if LLGL_D3D11_ENABLE_FEATURELEVEL >= 3 || defined LLGL_OS_UWP
# include <dxgi1_2.h>
#endif

Expand Down

0 comments on commit 73f89cc

Please sign in to comment.