XDK Sample Framework

Xbox One samples make use of a common project template for the basic rendering and update loop, and uses a common abstraction for the device and swapchain.

File(s) Description
Main.cpp This is the main entry-point for the sample. For Xbox One, this can be implemented using either C++/CX (a.k.a /ZW) or C++/WinRT projections depending on the sample.
Sample.h/.cpp Most samples contain a specific .h/.cpp for the core code, along with some number of additional files. These filenames will match the name of the sample and is your initial starting-point for understanding a sample.
DeviceResources.h/.cpp This is the basic abstraction for device & swapchain. There is a DirectX 11 and a DirectX 12 version depending on the specific sample.
StepTimer.h This header provides game time for the rendering & update loop. For more information, see StepTimer.
pch.h/pch.cpp Most samples make use of a precompiled header.
Telemetry.h Xbox One XDK samples are instrumented with basic ETW telemetry. If you want to disable this telemetry, look in the Main.cpp file.

Generic versions of these templates are available on GitHub for Xbox One, Win32 desktop, and Universal Windows Platform (UWP) apps).

Samples also make use of one or more Kits to provide utility and support code:

Kit(s) Description
DirectXTK DirectX Tool Kit for DX11 </br> See GitHub for tutorials, documentation, and source.
DirectXTK12 DirectX Tool Kit for DX12 </br> See GitHub for tutorials, documentation, and source.
DirectXTex DirectX Texture Library </br> See GitHub for documentation and source.
ATGTK </br> CPUTK </br> LIVETK These contain various helper utility code used in ATG sample development. The generic code is usually in the DX namespace, while other code is in the ATG namespace.

Older framework

Older Xbox One samples made use of the XDK Sample Framework (a.k.a. XSF) which was found in the Common\SampleFramework folder. This framework is deprecated, and the samples that used it are being rewritten. This framework code was never intended for use in shipping titles.

See also

Running the XDK Samples