Awesome
DirectX SDK Legacy Samples
This repository contains an archive of DirectX samples that shipped in the legacy DirectX SDK. They have been updated to build with Visual Studio 2019 or later, require only the current Windows SDK, and make use the Microsoft.DXSDK.D3DX NuGet package.
THIS REPOSITORY IS ONLY FOR EDUCATIONAL AND HISTORICAL REFERENCE. Use of the legacy DirectX SDK, D3DX9, D3DX10, D3DX11, DXUT, and/or FX11 is not recommended for new projects.
Copyright (c) Microsoft Corporation.
Disclaimer
The DirectX SDK itself is deprecated and legacy per Microsoft Docs, along with D3DX9, D3DX10, D3DX11, XACT, Managed DirectX 1.1, XInput 1.1-1.3, and XAudio 2.0-2.7. These samples are provided here for developer education, but new projects are strongly encouraged to seek out supported alternatives to these legacy components. They also have known security issues and bugs as well.
Technology | Notes |
---|---|
DirectX 12 | See DirectX-Graphics-Samples, DirectX-Headers, DirectXShaderCompiler, and the DirectX 12 Agility SDK. |
Microsoft GDK</br>Xbox Development | See Xbox-GDK-Samples and Xbox-ATG-Samples. |
Universal Windows Platform (UWP) | See Windows-universal-samples. |
DXUT for Direct3D 11 | See DXUT. |
Effects for Direct3D 11 | See FX11. |
XNAMath | See DirectXMath. |
DirectX Capabilities Viewer | See DxCapsViewer. |
UVAtlas isochart texture atlas | See UVAtlas. |
Documentation
A catalog of samples can be found on the project wiki.
Release Notes
FOR SECURITY ADVISORIES, see GitHub.
For a full change history, see CHANGELOG.md.
-
The XInput samples have been updated to use XInput 1.4 or XInput 9.1.0. XInput 1.3 usage requires the legacy DirectX SDK and is strongly discouraged.
-
The XAudio2 samples have been updated to use XAudio 2.9 built into Windows 10/Windows 11 or via XAudio2Redist.
-
The XACT samples are not included in this repository because they will only build with the legacy DirectX SDK.
-
The legacy DirectSound samples from DirectX SDK (November 2007) are included for completeness. They require the optional "MFC" Visual Studio component be installed ("C++ v14.29 (16.11) MFC for v142 build tools (x86 & x64)").
-
The Managed DX 1.1 C# samples are not included in this repository because they require both legacy .NET 1.1 and the legacy DirectX SDK to build.
-
There are three versions of DXUT included in this repository:
-
"DXUT" is the Direct3D 9 / Direct3D 10 version and makes use of D3DX9/D3DX10 that shipped in the legacy DirectX SDK.
-
"DXUT11" is the Direct3D 9 / Direct3D 11 version and makes use of D3DX9/D3DX11 that shipped in the legacy DirectX SDK.
-
"DXUT11.1" is a Direct3D 11 only version that does not make use of legacy D3DX which shipped on GitHub.
-
-
The version of Effects for Direct3D 11 included in this repository matches the updated version which shipped on GitHub. Note that the required
fx_*
profiles for the HLSL compiler are deprecated.
Contributing
This project is largely a historical reference of the legacy DirectX SDK samples with some modernization over the past decade. There's no Issues tab as the content is largely provided "as is". PRs for critical fixes, in particular security issues, are welcome.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.
Code of Conduct
This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.
Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.
Credits
A full list of credits for all these samples is lost to history. They have been developed by various Microsoft engineers over many years.
A partial list of contributors includes: Dave Bonora, David Cook, Shanon Drone, Kev Gee, Xin Huang, Matt Lee, Cody Pritchard, Jason Sandlin, David Tuft, and Chuck Walbourn.
The following samples were provided by AMD: DepthOfField10.1, HDAO10.1, TransparencyAA10.1, ContactHardeningShadows11, DecalTessellation11, DetailTessellation11, and PNTriangles11.