Where is the DirectX SDK?
Starting with Windows Developer Preview, the DirectX SDK is included as part of the Windows SDK.
We originally created the DirectX SDK as a high-performance platform for game development on top of Windows. As DirectX technologies matured, they became relevant to a broader range of applications. Today, ubiquity of Direct3D hardware in computers drives even traditional desktop applications to use graphics hardware acceleration. In parallel, DirectX technologies are more integrated with Windows. DirectX is today a fundamental part of Windows.
Because the Windows SDK is the primary developer SDK for Windows, we now ship DirectX as part of the Windows SDK. You can now use the Windows SDK to build great games for Windows.
The following former DirectX SDK technologies and tools are now part of the Windows SDK:
| Technology or Tool | Description |
|---|---|
|
Windows Graphics Components |
The headers and libraries for Direct3D and other Windows graphics APIs, like Direct2D, are available in the Windows SDK. Note D3DX is only available for download in previous versions of the DirectX SDK. The D3DCSX DirectCompute utility library is available in the Windows SDK. |
|
HLSL compiler (FXC.EXE) |
The HLSL compiler ships as a tool in the appropriate architecture subdirectory under the bin folder in the Windows SDK. Note The D3DCompiler API is available in the Windows SDK. |
|
PIX for Windows |
A replacement for the PIX for Windows tool now ships as a feature in Microsoft Visual Studio, called Visual Studio Graphics Diagnostics. This new feature has greatly improved usability, support for Windows Developer Preview and Direct3D 11.1, and integration with traditional Visual Studio features such as call stacks and debugging windows for HLSL debugging. For more info about this new feature, see Visual Studio Graphics Diagnostics. |
|
XAudio2 for Windows |
The XAudio2 API now ships as a system component in Windows Developer Preview. The headers and libraries for XAudio2 are available in the Windows SDK. |
|
XInput for Windows |
The XInput API now ships as a system component in Windows Developer Preview. The headers and libraries for XInput are available in the Windows SDK. |
|
XNAMATH |
The most recent version of XNAMATH, which is updated for Windows Developer Preview, now ships as DirectXMath. The headers for DirectXMath are available in the Windows SDK. |
|
DirectX Control Panel |
The DirectX Control Panel utility ships in the appropriate architecture subdirectory under the bin folder in the Windows SDK. |
|
XACT |
The Xbox Audio Cross Platform Tool (XACT) is no longer supported for use on Windows. |
|
Games Explorer and GDFMAKER |
The Games Explorer API presents games to users of Windows. The Games Explorer API is supported only on Windows Vista and Windows 7. You need to use the Games Definition File Maker tool (GDFMAKER.EXE) to declare game ratings for Metro style games. For info about how to create GDF files for Metro style games, see Creating a GDF File. |
|
Samples |
All new samples that highlight DirectX technologies on Windows ship online in the Windows SDK Samples Gallery. Most samples for older versions of Direct3D are only available for download in previous versions of the DirectX SDK. |
For access to historical versions of these DirectX SDK tools and technologies, download previous versions of the DirectX SDK from the Microsoft Download Center. We shipped the last version of the DirectX SDK in June 2010.
Using DirectX SDK projects with the Microsoft Visual Studio 11 Ultimate Developer Preview
The samples from the June 2010 DirectX SDK are supported with the Microsoft Visual Studio 11 Ultimate Developer Preview, both on Windows 7 and the Windows Developer Preview release itself. Due to the transition of DirectX headers and libraries into the Windows SDK, changes to the project settings are needed to build these samples correctly with the new Windows Developer Preview SDK that ships with the Visual Studio 11 Ultimate Developer Preview
These steps will also apply to your own projects that are dependent on the DirectX SDK.
-
Ensure that the June 2010 release of the DirectX SDK is installed on your development machine. Installing onto a PC running the Windows Developer Preview will trigger the installation of .NET as mandatory pre-step of the SDK install.
-
Ensure that you are using the Visual Studio 11 Ultimate Developer Preview version. Microsoft Visual Studio 11 Express for Windows Developer Preview will not build Windows Developer Preview desktop applications such as the DirectX SDK samples. To install Visual Studio 11 Ultimate Developer Preview, go to: http://www.microsoft.com/download/en/details.aspx?id=27543 and follow the instructions.
-
If you are using the Visual Studio 11 Ultimate Developer Preview on Windows 7, it installs Direct3D developer runtimes for Windows Developer Preview that are not compatible with Windows 7. Copy the DirectX SDK versions of D3D10REF.DLL, D3D10SDKLAYERS.DLL, D3D11REF.DLL, D3D11SDKLAYERS.DLL, D3D9D.DLL, and D3DREF9.DLL from %DXSDK_DIR%\Developer Runtime\<arch> into your %WINDIR%\System32 and /or %WINDIR%\SysWow64 directory (if you are on a 64-bit platform).
If you are using Direct2D, you can obtain the Windows 7 version of D2D1DEBUG.DLL from http://msdn.microsoft.com/en-us/library/windows/desktop/ee794287(v=vs.85).aspx.
-
Use the DirectX SDK Sample Browser to install the project files for the desired sample. Open the sample’s Microsoft Visual Studio 2010 compatible solution file (suffixed with _2010.)
If you are opening the sample on a system that only has the Visual Studio 11 Ultimate Developer Preview installed, you will get the following error message, as expected: "Toolset 'v100' for platform 'Win32' cannot be found. To be able to build this project either install the toolset or change the toolset by right clicking on the solution and choosing "Upgrade VC++ Projects.""
-
Upgrade your project to the new v110 toolset by right-clicking on your project in the Solution Explorer window and choosing Upgrade.
-
D3DX is not considered the canonical API for using Direct3D in Windows Developer Preview and therefore does not ship in the corresponding Windows SDK. You are recommended to investigate alternate solutions for working with the Direct3D API. For legacy projects such as the Windows 7 (and earlier) DirectX SDK samples, the following steps are necessary to build applications with D3DX using the DirectX SDK:
-
You will need to modify the project’s VC++ directories as follows to use the right order for SDK headers and libraries.
- i. Open Properties for the project and select the VC++ Directories page.
- ii. Select All Configurations and All Platforms.
- iii. Set these directories as follows:
- Executable Directories: <inherit from parent or project defaults> (On right-side drop-down)
- Include Directories: $(IncludePath); $(DXSDK_DIR)
- Include Library Directories: $(LibraryPath); $(DXSDK_DIR)Lib\x86
- iv. Click Apply.
- v. Choose the x64 Platform.
- vi. Set the Library Directory as follows:
- Library Directories: $(LibraryPath); $(DXSDK_DIR)Lib\x64
-
The Windows SDK Developer Preview currently ships a number of incorrect D3DX headers that correspond to a version of D3DX that does not exist. To fix these headers, follow these steps.
- i. Remove all files beginning with "D3DX" (for example, "D3DX*.*") from %ProgramFiles(x86)%\Windows Kits\8.0\Lib\win8\um\<arch> where <arch> is x86 and x64.
- ii. Remove all files beginning with "D3DX" (for example, "D3DX*.*") from %ProgramFiles(x86)%\Windows Kits\8.0\nclude\um
Note Deleting these files will require administrator privileges.
- Wherever "d3dx9.h", "d3dx10.h", or "d3dx11.h" are included in your project, be sure to explicitly include "d3d9.h", "d3d10.h"+"dxgi.h", or "d3d11.h"+"dxgi.h" first to ensure you are picking up the newer version. You can disable warning C4005 if needed, but this likely indicates you are including the older version of these headers.
- Remove all references to DXGIType.h in your project. This header does not exist in the Windows SDK and the DirectX SDK version conflicts with the new winerror.h.
- All D3DX DLLs are installed onto your development machine by the DirectX SDK install. Ensure that the necessary D3DX dependencies are redistributed with any sample or with your application if it is moved to another machine.
-
-
Ensure that you are using the new version of the HLSL shader compiler by observing the following conditions:
-
Changing the executable directory as per step 5 will cause project builds to use FXC from the Windows SDK install. Note that HLSL files are now officially recognized by Visual Studio -- you can add them as project files and set compiler options through the project system.
-
Invoking run-time compilation through the legacy D3DX DLL will use the incorrect older version of the HLSL compiler. Replace all references to D3DXCompile*, D3DX10Compile*, and D3DX11Compile* APIs in your code with the D3DCompile function in D3DCOMPILER_44.DLL.
-
Any project that uses run-time shader compilation will need to have D3DCOMPILER_44.DLL copied to the local executable path for the project. This DLL is available in this sub-directory of the Windows SDK install under %ProgramFiles(x86)%\Windows Kits\8.0\Redist\D3D\<arch> where <arch> is x86 and x64.
The D3DCOMPILER_44.DLL from the Windows SDK is not a system component and should not be copied to the Windows system directory. You can redistribute this DLL to other machines with your application as a side-by-side DLL.
-
-
Any project that uses the XAudio2 or XInput API and is intended to run on Windows 7 or older versions of Windows will need to explicitly include the headers and libraries for these components from the DirectX SDK. The XAudio2 and XInput headers and libraries that ship in the Windows SDK target only the versions that ship as part of Windows 8.
For example, with XAudio2, you should
#includethe specific XAudio2 headers from the DirectX SDK directly:#include <%DXSDK_DIR%Include\xaudio2.h>...and in your linker options for Additional Dependencies, you should link directly to the DirectX SDK XAudio2:
%DXSDK_DIR%Include\<arch>\xaudio2.lib
The binaries for XAUDIO2_7.DLL or XINPUT1_3.DLL binaries are installed to the Windows system directories by the DirectX SDK install on your development machine. You will need to redistribute these libraries with your application using the DirectX Setup install from the DirectX SDK.
-
If you’ve used the DirectX SDK with past versions of Visual Studio, the Visual Studio 2010 upgrade may have migrated the DirectX SDK path into your default project settings. It is recommended that you remove these settings to prevent future build errors. In the %USERPROFILE%\AppData\Local\Microsoft\MSBuild\v4.0 directory, modify the Microsoft.Cpp.Win32.user and Microsoft.Cpp.x64.user files to remove all references to DXSDK_DIR paths. Alternatively, you can remove the entire <PropertyGroup> node that contains the Path entries such as <ExecutablePath> and <IncludePath> to revert to standard defaults. If you don’t see references to DXSDK_DIR in these files, no changes are necessary.
