Rafael Ferreira
Rafael Ferreira

Reputation: 91

Is there a way to use DirectX 11 in Windows 7?

I was trying to start to learn programming in DirectX 11, but I'm still using Windows 7 OS. My IDE is Visual Studio Community 2019 and I've tried to create a DirectX 11 project, but I got the error message saying that I need to upgrade my system to Windows 10 to be able to use this feature. I've downloaded Microsoft Development Kit, SDK and another extensions VS offered to me thinking it would actually work, but it didnt. I'm sorry if this seems a silly question, but I'm new on this and I would find it a great help if someone is able to tell me what I'm doing wrong or if there is really not other way to program in DirectX 11 on windows 7.

Upvotes: 2

Views: 6511

Answers (1)

Chuck Walbourn
Chuck Walbourn

Reputation: 41057

As noted by Simon in the comments, the "DirectX" templates built-in to VS 2019 are for Universal Windows Platform (UWP) apps only which requires Windows 10.

I maintain a number of similar templates for UWP and Win32 for DirectX 11 & DirectX 12 on GitHub.

Windows 7 supports DirectX 11.0.

Windows 7 can support DirectX 11.1 "software features" but not "hardware features" with KB2670838. Basically this means you won't get D3D_FEATURE_LEVEL_11_1. See Microsoft Docs. Most any Windows 7 system that's updated from Windows Update should have it.

My Win32 templates assume you have DirectX 11.1 these days. For the details on handling DirectX 11.0, see this blog post.

VS 2019 can support targeting Windows 7 Service Pack 1 for Win32 desktop development. Officially Windows 7 RTM is not supported.

VS 2019 comes with the Windows 10 SDK which includes everything you need for basic Direct3D 11 system headers and libraries. You do not need the legacy DirectX SDK at all. That said, if your learning materials still reference legacy stuff like D3DX11, you can install it but beware there are some special setup details. See Microsoft Docs.

For XAudio2 on Windows 7 SP1, use the XAudio2Redist instead of the legacy DirectX SDK. For XInput, you can use the basic XInput 9.1.0 which is built-in to Windows 7.

You may want to take a look at the DirectX Tool Kit tutorials.

Upvotes: 1

Related Questions