EN
Tento obsah není k dispozici ve vašem jazyce, ale můžete využít tuto verzi v anglickém jazyce.

Where is the DirectX SDK?

Starting with Windows 8, 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, the availability 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 now a fundamental part of Windows.

Because the Windows SDK is the primary developer SDK for Windows, DirectX is now included in it. You can now use the Windows SDK to build great games for Windows. To download the Windows 8 SDK, see Downloads for developing desktop apps.

The following technologies and tools, formerly part of the DirectX SDK, are now part of the Windows SDK:

Technology or toolDescription

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 is 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 is now a feature in Microsoft Visual Studio, called Visual Studio Graphics Debugger. This new feature has greatly improved usability, support for Windows 8, and Direct3D 11.1, and integration with traditional Microsoft Visual Studio features such as call stacks and debugging windows for HLSL debugging. For more info about this new feature, see Debugging DirectX Graphics.

XAudio2 for Windows

The XAudio2 API is now a system component in Windows 8. The headers and libraries for XAudio2 are available in the Windows SDK.

XInput for Windows

The XInput API is now a system component in Windows 8. The headers and libraries for XInput are available in the Windows SDK.

XNAMATH

The most recent version of XNAMATH, which is updated for Windows 8, is now DirectXMath. The headers for DirectXMath are available in the Windows SDK.

DirectX Control Panel and DirectX Capabilities Viewer

The DirectX Control Panel and DirectX Capabilities Viewer utilities are included 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. Use the Games Definition File Maker tool (GDFMAKER.EXE) to declare game ratings for Windows Store apps. For info about how to create GDF files for Windows Store apps, see Creating a GDF File.

The Game Definition File Maker tool (GDFMaker.exe) is included in the x86 subdirectory under the bin folder in the Windows SDK, and supports both Windows Store apps and Win32 desktop applications.

Note  The Game Definition File Validator tool (gdftrace.exe) and Gameux Install Helper sample are both available in the MSDN Code Gallery.

Samples

All new samples that highlight DirectX technologies on Windows are 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 although a number of them are online as well. For more info about these samples, see DirectX SDK Samples Catalog.

 

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.

Note  The DirectX SDK fails to install if you have a certain version of the Visual C++ 2010 Redistributable Package already installed. For more info about and a solution to fix this issue, see "S1023" error when you install the DirectX SDK (June 2010).

Using DirectX SDK projects with Visual Studio

The samples from the June 2010 DirectX SDK are supported with premium Visual Studio SKUs (Microsoft Visual Studio Professional 2012, Microsoft Visual Studio Ultimate 2012, Microsoft Visual Studio Professional 2013, or Microsoft Visual Studio Ultimate 2013) on Windows 7 and the Windows 8 and later releases. 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 how the Windows 8 SDK and later is packaged with the premium Visual Studio SKUs.

These steps also apply to your own projects that are dependent on the DirectX SDK.

  1. Ensure that the June 2010 release of the DirectX SDK is installed on your development computer. If you install onto a computer running Windows 8 and later, you will be prompted and required to enable .NET 3.5 as a prerequisite installation to the DirectX SDK.

    Note  The DirectX SDK fails to install if you have a certain version of the Visual C++ 2010 Redistributable Package already installed. For more info about and a solution to fix this issue, see "S1023" error when you install the DirectX SDK (June 2010).

  2. Make sure that you are using one of the premium Visual Studio SKUs. Microsoft Visual Studio Express 2012 for Windows 8 or Microsoft Visual Studio Express 2013 for Windows won't build Windows 8 and later desktop applications such as the DirectX SDK samples. To install one of the premium Visual Studio SKUs, go to: Visual Studio downloads and follow the instructions.

  3. 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).

  4. If you are opening the sample on a system that only has Microsoft Visual Studio 2012 or Microsoft Visual Studio 2013 installed, you get the following message: "This solution contains one or more projects using an earlier version of VC++ compiler and libraries. Each project can be updated to use the VC++ compiler and libraries (v110)." Choose the Update option from this dialog box to update before you open the project.

    Otherwise, you can update to the Visual Studio 2012 or Visual Studio 2013 C++ 11 compiler and libraries after they have loaded by right-clicking on the solution and choosing Update VC++ projects.

  5. D3DX is not considered the canonical API for using Direct3D in Windows 8 and later and therefore isn't included with the corresponding Windows SDK. 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:

    1. 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
      • 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
    2. Wherever "d3dx9.h", "d3dx10.h", or "d3dx11.h" are included in your project, be sure to explicitly include "d3d9.h", "d3d10.h" and "dxgi.h", or "d3d11.h" and "dxgi.h" first to ensure you are picking up the newer version. You can disable warning C4005 if needed; however, this warning indicates you are using the older version of these headers.
    3. Remove all references to DXGIType.h in your project. This header doesn't exist in the Windows SDK, and the DirectX SDK version conflicts with the new winerror.h.
    4. All D3DX DLLs are installed onto your development computer by the DirectX SDK installation. Ensure that the necessary D3DX dependencies are redistributed with any sample or with your application if it is moved to another machine.
    5. Be aware that replacement technologies for current uses of D3DX11 include DirectXTex and DirectXTK. D3DXMath is replaced by DirectXMath.
  6. Ensure that you are using the new version of the HLSL shader compiler by observing the following conditions:

    1. Changing the executable directory as per step 5 will cause project builds to use FXC from the Windows SDK install. Be aware 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.

    2. 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_46.DLL or D3DCOMPILER_47.DLL.

    3. Any project that uses run-time shader compilation must have D3DCOMPILER_xx.DLL copied to the local executable path for the project. This DLL is available in this sub-directory of the Windows SDK installation under %ProgramFiles(x86)%\Windows Kits\8.0\Redist\D3D\<arch> or %ProgramFiles(x86)%\Windows Kits\8.1\Redist\D3D\<arch> where <arch> is x86 and x64.

      The D3DCOMPILER_46.DLL or D3DCOMPILER_47.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 computers with your application as a side-by-side DLL.

  7. Any project that uses the XInput API and is intended to run on Windows 7 or older versions of Windows need to use either the legacy version (9.1.0) or will need to explicitly include the headers and libraries for this component from the DirectX SDK. The XInput header and XINPUT.LIB that are included in the Windows SDK target only the version (1.4) that ship as part of Windows 8 and later. The same header can be used with XINPUT9_1_0.LIB to use the legacy version, which is included with older versions of Windows. The legacy version of XInput doesn't detect full capabilities or support controller-integrated audio, so if support for these features is required, you must use the DirectX SDK version (1.3).

    To use the full-featured down-level XInput API, you should #include the specific XInput headers from the DirectX SDK directly:

    #include <%DXSDK_DIR%Include\xinput.h>

    ...and in your linker options for Additional Dependencies, link directly to the DirectX SDK XInput library:

    %DXSDK_DIR%Include\<arch>\xinput.lib

    The XINPUT1_3.DLL binary is installed to the Windows system directories by the DirectX SDK installation on your development computer. You will need to redistribute this binary with your application using the DirectX Setup installation from the DirectX SDK.

  8. Any project that uses the XAudio2 API and is intended to run on Windows 7 or older versions of Windows need to use either the older version (9.1.0) or explicitly include the headers and libraries for this component from the DirectX SDK. The XAudio2 headers and libraries that are included with the Windows SDK target only the version (2.8) that is included as part of Windows 8.

    For example, with XAudio2, you should #include the specific XAudio2 headers from the DirectX SDK directly:

    #include <%DXSDK_DIR%Include\xaudio2.h>

    ...and in your linker options for Additional Dependencies, link directly to the DirectX SDK XAudio2 library:

    %DXSDK_DIR%Include\<arch>\xaudio2.lib

    The XAUDIO2_7.DLL binary is installed to the Windows system directories by the DirectX SDK installation on your development computer. You need to redistribute these libraries with your application using the DirectX Setup installation from the DirectX SDK.

  9. If you’ve used the DirectX SDK with past versions of Visual Studio, the Visual Studio 2010 upgrade might 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.

  10. If the resulting app supports Windows Vista with Service Pack 2 (SP2) as well as Windows 7 and Windows 8 and later, set the Preprocessor Definition named _WIN32_WINNT to 0x600. If it only supports Windows 7 and Windows 8 and later, set it to 0x601.

    For example:

    1. Open Properties for the project and select C/C++ > Preprocessor.
    2. Select All Configurations and All Platforms.
    3. Go to the Preprocessor Definitions section and set _WIN32_WINNT=0x600.
    4. Click Apply.

Related topics

Games for Windows and the DirectX SDK
Where is the DirectX SDK (2013 Edition)?
Where is the DirectX SDK?
DirectX SDKs of a certain age
Living without D3DX

 

 

Zobrazit:
© 2014 Microsoft