walbourn/directx-vs-templates

Direct3D Visual Studio Templates

450

stars

535

commits

C

primary language

Sep 4, 2026

updated

walbourn.github.io/direct3d-game-visual-studio-templates-redux/
clang
cmake
desktop
msvc
uwp
xbox
Browse cluster: DirectX graphics and game development toolkit

README

Direct3D Game VS project templates

This repo contains simplified Visual C++ project templates. They are primarily intended for developer education, samples, and tutorials.

See Direct3D Game Visual Studio templates, Direct3D Game Visual Studio templates (Redux), and Direct3D Game Visual Studio templates (VCPKG edition).

Documentation is available on GitHub.

The templates in this repository have to be 'instanced' before use. This can be done using Visual Studio and the VSIX package, or by running the PowerShell scripts createcmake.ps1 or createmsbuild.ps1.

There are two versions of each template. The DR version adds a DeviceResources (DX11 or DX12) abstraction to isolate the device and swapchain code into it's own helper class.

For the UWP templates, there are C++/WinRT variants that use C++ Windows Runtime language projections rather than the C++/CX language extensions (/ZW).

There are two variants of the Direct3D desktop templates with DeviceResources that use the vcpkg C++ Package Manager.

VS 2022

The VSIX\Direct3DUWPGame.vsix also works for VS 2026.

The package requires the Universal Windows Platform development workload (Microsoft.VisualStudio.Workload.Universal) with the C++ Universal Windows Platform tools (Microsoft.VisualStudio.ComponentGroup.UWP.VC). The Win32 templates require the Desktop development with C++ workload (Microsoft.VisualStudio.Workload.NativeDesktop). It is recommended you make use of the Windows SDK (22000) or later.

The "Direct3D Win32 Game VCPKG" and "Direct3D12 Win32 Game VCPKG" templates require vcpkg Package Manager (Microsoft.VisualStudio.Component.Vcpkg).

Rebuilding the VSIX

Building the VSIX project requires VS 2022 with the .NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop) and Visual Studio extension development (Microsoft.VisualStudio.Workload.VisualStudioExtension) workloads.

Before loading the VSIX.sln, run VSIX\src\updatetemplates.cmd/.ps1 which creates the ZIPs of the individual templates.

Notices

All content and source code for this package are subject to the terms of the MIT License.

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.

Contributors

walbourn

477 commits

dependabot[bot]

55 commits

Crisspl

1 commits

walbourn/directx-vs-templates

Direct3D Visual Studio Templates

450

stars

535

commits

C

primary language

Sep 4, 2026

updated

walbourn.github.io/direct3d-game-visual-studio-templates-redux/
clang
cmake
desktop
msvc
uwp
xbox
Browse cluster: DirectX graphics and game development toolkit

README

Direct3D Game VS project templates

This repo contains simplified Visual C++ project templates. They are primarily intended for developer education, samples, and tutorials.

See Direct3D Game Visual Studio templates, Direct3D Game Visual Studio templates (Redux), and Direct3D Game Visual Studio templates (VCPKG edition).

Documentation is available on GitHub.

The templates in this repository have to be 'instanced' before use. This can be done using Visual Studio and the VSIX package, or by running the PowerShell scripts createcmake.ps1 or createmsbuild.ps1.

There are two versions of each template. The DR version adds a DeviceResources (DX11 or DX12) abstraction to isolate the device and swapchain code into it's own helper class.

For the UWP templates, there are C++/WinRT variants that use C++ Windows Runtime language projections rather than the C++/CX language extensions (/ZW).

There are two variants of the Direct3D desktop templates with DeviceResources that use the vcpkg C++ Package Manager.

VS 2022

The VSIX\Direct3DUWPGame.vsix also works for VS 2026.

The package requires the Universal Windows Platform development workload (Microsoft.VisualStudio.Workload.Universal) with the C++ Universal Windows Platform tools (Microsoft.VisualStudio.ComponentGroup.UWP.VC). The Win32 templates require the Desktop development with C++ workload (Microsoft.VisualStudio.Workload.NativeDesktop). It is recommended you make use of the Windows SDK (22000) or later.

The "Direct3D Win32 Game VCPKG" and "Direct3D12 Win32 Game VCPKG" templates require vcpkg Package Manager (Microsoft.VisualStudio.Component.Vcpkg).

Rebuilding the VSIX

Building the VSIX project requires VS 2022 with the .NET desktop development (Microsoft.VisualStudio.Workload.ManagedDesktop) and Visual Studio extension development (Microsoft.VisualStudio.Workload.VisualStudioExtension) workloads.

Before loading the VSIX.sln, run VSIX\src\updatetemplates.cmd/.ps1 which creates the ZIPs of the individual templates.

Notices

All content and source code for this package are subject to the terms of the MIT License.

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.

Contributors

walbourn

477 commits

dependabot[bot]

55 commits

Crisspl

1 commits

Languages

C

73.5%

C++

23.9%

CMake

1.7%