Games for Windows and the DirectX SDK blog

Technical tips, tricks, and news about game development for Microsoft platforms including desktop, Xbox, and UWP


Project maintained by walbourn Hosted on GitHub Pages — Theme by mattgraham
Home | Posts by Tag | Posts by Month

DirectX SDK Samples Catalog

dxsdk

Originally posted to Chuck Walbourn's Blog on MSDN,

Microsoft has moved away from providing samples in SDKs for a number of reasons, but primarily to reduce the size of the standalone downloads and to minimize the size of the SDKs when included in other products (such as the Windows SDK being included with Visual Studio). The MSDN Code Gallery provides an online repository for samples, including both official Microsoft samples as well as community contributions.. Here’s a list of the samples from the legacy DirectX SDK (June 2010) and their locations online if available.

Update: As of the Windows 10 SDK, official Windows samples are hosted on GitHub: Windows-universal-samples, Windows-classic-samples, Windows-driver-samples. You can also use this website to search Microsoft official samples.

These republished legacy DirectX SDK samples are now found on GitHub directx-sdk-samples and directx-sdk-legacy-samples as MSDN Code Gallery has been retired. DirectX 12 samples have their own repo, and also this one which hosts samples on DirectX and game development.

Direct3D 11

Tutorials

Tutorial01 - 07
Direct3D Tutorial Win32 Sample

Tutorial08-10
DXUT Tutorial Win32 Sample

Tutorial11-14
Effects Tutorial Win32 Sample

AdaptiveTessellationCS40
FluidCS11
HDRToneMappingCS11
NBodyGravityCS11
OIT11

DirectCompute Graphics Win32 Samples

BasicCompute11
ComputeShaderSort11
DirectCompute Basic Win32 Samples
BasicHLSL11
EmptyProject11
SimpleSample11

Basic DXUT Win32 Samples

BasicHLSL10
DynamicShaderLinkageFX11
FixedFuncEMU
Instancing10

Effects 11 Win32 Samples

These samples make use of the Effects 11 (FX11) library.

BC6HBC7EncoderDecoder11

BC6H/BC7 DirectCompute Encoder Tool (Win32)

Note this functionality is also present in the DirectXTex.

CascadedShadowMaps11
VarianceShadows11

Direct3D Shadow Win32 Samples

DDSWithoutD3DX
DDSWithoutD3DX11

An updated version of this sample is posted here.

The DDSTextureLoader is available in both DirectX Tool Kit (DX11 / DX12) and DirectXTex. There are versions for Direct3D 12, Direct3D 11, and Direct3D 9.

DynamicShaderLinkage11 / DynamicShaderLinkageFX11

Dynamic Shader Linkage Win32 Sample

MultithreadedRendering11

Direct3D Multithreaded Rendering Win32 Sample

SimpleBezier11
SubD11

Direct3D Tessellation Win32 Samples

UVAtlas

UVAtlas

Misc

Collision

DirectXMath Win32 Sample

ContentExporter

Samples Content Exporter Update

CoreDetection

Core Detection Sample (Win32)

D3D11InstallHelper

Direct3D 11 Install Helper (Win32)

FirewallInstallHelper

Windows Firewall Install Helper (Win32)

GameuxInstallHelper

Gameux Install Helper (Win32)

VideoMemory

DirectX Video Memory (Win32)

XInput

SimpleController
RumbleController

XInputGame

XInput Samples (Win32)

XInputGame can be found here.

XInput 1.4 is supported on Windows 8.x and Windows 10. XInput 9.1.0 is in all versions of Windows since Windows Vista.

See XINPUT and Windows 8 for more information.

XAudio2

XAudio2BasicSound
XAudio2BasicStream
XAudio2Sound3D
XAudio2CustomAPO

XAudio2 Samples (Win32)

XAudio 2.8 is supported on Windows 8.x or Windows 10. Windows 10 includes XAudio 2.9 and is available through XAudio2Redist on Windows 7 SP1 or Windows 8.x as well.

See XAudio2 and Windows 8 for more information.

DirectXTK for Audio is also a sample of XAudio2 usage, and is demonstrated in the DirectX Tool Kit Simple Samples.

DirectInput

Customformat
FFConst
Joystick

DirectInput Samples (Win32)

Keyboard and Mouse samples are not included as use of DirectInput for these scenarios is not recommended. See this blog post.

Direct3D 9

AntiAlias
-
Text3D

The Direct3D 9 samples require D3DX9, and therefore make use of the Microsoft.DXSDK.D3DX NuGet package. They can be found in the directx-sdk-legacy-samples repository.

Direct3D 10

10BitScanout10
-
TransparencyAA10.1

The Direct3D 10 samples require D3DX10, and therefore make use of the Microsoft.DXSDK.D3DX NuGet package. They can be found in the directx-sdk-legacy-samples repository.

DirectSound

AdjustSound
-
VoiceManagement

The DirectX SDK (November 2007) release was the last time the DirectSound samples were shipped. They can be found in the directx-sdk-legacy-samples repository.

Windows 7.1 SDK Samples

DirectShow

A list of Windows 7.x SDK DirectShow samples is available on Microsoft Docs.

Note: You can find them on GitHub.

Windows Imaging Component

WIC Progressive Decode Win32 Sample
WIC Animated GIF Win32 Sample
WIC and Direct2D Image Viewer Win32 Sample

You can find them on GitHub.

The Windows 7.1A SDK is integrated with VS 2012 - VS 2019 as part of the v1xx_xp Platform Toolset, but does not include the samples. The easiest place to get these legacy samples now is on GitHub.

AMD Samples

These samples shipped in the DirectX SDK (June 2010) and were contributed by AMD.

DepthOfField10.1
HDAO10.1
TransparencyAA10.1

ContactHardeningShadows11
DecalTessellation11
DetailTessellation11
PNTriangles11

This samples make use of D3DX10/D3DX11 and therefore require the use of the Microsoft.DXSDK.D3DX NuGet package. These are included in the directx-sdk-legacy-samples repository.

Retired Samples

DirectDraw

The DirectX SDK 8.1 was the last to contain the DirectDraw samples.

DirectMusic
DirectPlay

DirectX 9.0b (Summer 2003) was the last release of the DirectMusic or DirectPlay samples.

Managed DirectX 1.1

The DirectX SDK (August 2006) release was the last time the C# samples for legacy Managed DirectX 1.1 were shipped

XACT

The DirectX SDK (June 2010) contains the last release of XACT and related samples.

Note that the DirectX Tool Kit for Audio includes a XWBTool command-line utility for creating/using XACT-style wave banks for both in-memory playback and streaming.

Related: DXUT for Win32 Desktop Update, Living without D3DX, DirectX SDK Tools Catalog, Where is the DirectX SDK (2021 Edition)?