Roadmap for Windows Store apps using DirectX and C++
[ This article is for Windows 8.x and Windows Phone 8.x developers writing Windows Runtime apps. If you’re developing for Windows 10, see the latest documentation ]
Here are key resources to help you get started with using DirectX and C++ to develop graphics-intensive Windows Store apps, like games. This is not a comprehensive list of all of the features or available resources.
Note The DirectX 11.1 APIs are available for both Windows Store and Desktop apps. As you explore this roadmap, you'll discover that many of the DirectX-specific topics are in the MSDN Library content, outside of the Windows Developer Center. That's okay! The DirectX 11.1 APIs, including Direct2D, Direct3D, DirectWrite, XAudio2, XInput, and DirectXMath, are all available for Windows Store app development as well. Of course, they can only be used with C++ in your Windows Store app, and some of the inline code samples use Desktop Win32 programming syntax and styles. So, you must familiarize yourself with the version of C++ (called C++/CX) used for Windows Store app development (we've provided links to help for that, as well).
Getting started
Looking to get started quickly? Here are the key topics: setting up your DirectX project, acclimating yourself to the Windows Runtime, and diving into samples.
Topic | Description |
---|---|
Prerequisites for developing a Windows Store app using DirectX |
Find out what you need to start making a DirectX Windows Store app. |
Walk the code for the Direct3D App template from Microsoft Visual Studio 2012. This is a good starting point for new and experienced DirectX developers alike. |
|
Browse for a specific DirectX Windows Store app sample, and get straight into the code! |
|
Explore Windows Store game development, from JavaScript to DirectX. |
|
You must have Visual Studio 2013 to create Windows Store apps. |
|
Contains guidance for devs who want to bring their DirectX projects into Microsoft Visual Studio. |
Basic features and concepts for Windows Store apps with DirectX and C++
To develop a Windows Store app with DirectX and C++, you must understand what a Windows Store app is. You must also understand how the Windows Runtime and DirectX work together. The best Windows Store apps follow a common set of design principles, and use features from the Windows Runtime. Here are some links to help you understand what the Microsoft design language means, determine what's available for you, and plan for a great overall app experience.
Topic | Description |
---|---|
What kind of app should you make? How do you plan for different devices? How should you monetize your app? Make the right decisions during the planning phase to simplify deployment and maximize your app's potential. |
|
Review the core concepts for DirectX game development with Windows 8. |
|
Walk through a complete DirectX Windows Store game sample and learn about the different components you use to construct it. |
|
When developing a Windows Store app with DirectX and C++, you may need to create and access Windows Runtime components. Review the process here. |
|
Explore DirectX and its APIs, including Direct3D, Direct2D, DirectWrite, DirectXMath and XAudio2. |
Designing and developing a user interface
When it comes to the Windows UI, life is a little easier when you're an HTML5 or XAML developer. The good news is: DirectX developers can work with XAML, too!
Topic | Description |
---|---|
What is XAML? Go over the basics of XAML elements and layout. |
|
Discover how to create a basic UI with XAML. This quickstart is not specific to C++. |
|
Describes how to integrate DirectX surfaces into XAMLUI elements. |
|
Learn how to make sure that your DirectX game is reactive and responsive with respect to the input event messaging infrastructure, and how to make it work as a great Windows Store app. |
|
Learn how to support screen rotation behaviors in your Windows Store apps using DirectX with C++. |
|
Review the Windows::UI::CoreWindow API type and learn about the basic window infrastructure for Windows Store apps. |
|
Browse the Windows::UI::Core API namespace and learn about the basic UI infrastructure for Windows Store apps. |
|
Windows::UI::Xaml::Media::Imaging::SurfaceImageSource API reference |
If you're using XAML, familiarize yourself with the SurfaceImageSource type (as well as ISurfaceImageSourceNative). |
Windows::UI::Xaml::::Media::Imaging::VirtualSurfaceImageSource API reference |
If you're using XAML, familiarize yourself with the VirtualSurfaceImageSource type (as well as IVirtualSurfaceImageSourceNative). |
If you're using XAML, familiarize yourself with the SwapChainPanel type (as well as ISwapChainPanelNative). |
Interoperating with the Windows Runtime
DirectX 11.1 is the core audiovisual feature of Windows 8, and the very backbone of the Windows UI as well. As a result, its APIs sit outside the Windows Runtime, and are available to both Desktop and Windows Store apps. That affords you, the DirectX dev, some extra oomph when it comes to graphics. At the same time, a few features that the other programming models take for granted, such as the app bar and layout APIs, require a little extra work for the DirectX developer.
Topic | Description |
---|---|
Learn basic background information about interoperation between DirectX and the Windows Runtime. |
|
Learn about asynchronous and multithreaded programming for DirectX apps and games. |
|
When developing a Windows Store app with DirectX and C++, you may need to create and access Windows Runtime components. Review the process here. |
Handling input and controls
Windows 8 provides many new and tightly integrated input, control, device, and sensor options. DirectX devs can couple these new and refined forms of input to fast, fluid audiovisual experiences and graphics intensive apps. The following links cover what you need to connect to the Windows Runtime's event infrastructure, and where to go to discover more about the range of input models, sensors, and devices supported by Windows 8. Oh, and you've now got access to the XInput library for Xbox controller support!
Topic | Description |
---|---|
Take a look at the different input and control options available to Windows Store apps with DirectX. |
|
Learn more about the ways users can interact with your Windows Store apps with DirectX, and how to develop for different input and control models. |
|
Learn how to make sure that your DirectX game is reactive and responsive with respect to the input event messaging infrastructure, and how to make it work as a great Windows Store app. |
|
Learn how to incorporate touch input in your Windows Store app using DirectX. |
|
Learn about important mouse input considerations in your Windows Store app using DirectX. |
|
Learn how to incorporate basic touch controls, such as screen panning, into your Windows Store apps with DirectX. |
|
Learn how to create a basic touch-based "move-look" controller for a 3D Windows Store apps with DirectX. |
|
Use sensors to respond to user input or changes in external conditions (like lighting). This article also lists requirements that your app must meet to be accepted in the Windows Store. |
|
Use motion and orientation sensors. |
|
Learn to incorporate the Xbox 360 controller in your DirectX games. |
Managing process lifetimes and suspend/resume
A great DirectX Windows Store app must behave like any other Windows Store app. However, a DirectX app is often more complicated than its HTML5 and managed peers. If you're a game developer in particular, you must familiarize yourself with the Windows Runtime's process lifetime management behaviors, as well as the supported threading models and best practices for suspend/resume scenarios.
Topic | Description |
---|---|
Working with event messaging and CoreWindow (DirectX and C++) |
Learn best practices for handling CoreWindow event messages. |
Learn how to restore your app to a presentable state after it's closed. This is a must for most apps. |
|
Walk code that shows how to activate your Windows Store app using DirectX. |
|
Walk code that shows how to suspend your Windows Store app using DirectX. |
|
Walk code that shows how to resume your Windows Store app using DirectX. |
Developing 2D graphics
If you're creating a 2D graphics application, you have a number of options, from XAML to Direct2D and DirectWrite -- or some combination thereof.
Topic | Description |
---|---|
Jump right in to Direct2D development! Create a 2D app, or use the provided primitives to create your own interface or display overlay. |
|
Walkthrough the basic structure of a Direct2D desktop app. |
|
Learn about DirectWrite and displaying text in DirectX apps. |
|
Follow a quick guide to DirectWrite features. |
|
Learn about the various features of Direct2D from a code perspective. |
Developing 3D graphics
Direct3D 11.1 is a rich, powerful set of graphics and multimedia APIs that you can use to create great looking apps (read: games) on the platform. DXGI provides the infrastructure that lets you access the graphics adapter hardware.
Topic | Description |
---|---|
Get started with Direct3D, and Direct3D 11.1 in particular. Note that this is NOT a 3D graphics programming primer. |
|
Learn more about the features available in Direct3D 11.1, and how they can enhance your DirectX Windows Store app. |
|
Learn how to develop against the new model and features in Direct3D 11. |
|
Learn how to develop HLSL-based shader routines for your DirectX app. Shaders are the core of modern Direct3D visuals. |
|
Learn more about developing with the low-level DirectX Graphics Interface (DXGI) APIs. Every DirectX developer must be familiar with them. |
|
DirectXMath programming guide | Math is hard! (For some of us.) Explore the DirectXMath APIs, which provide graphics-friendly types and simplify many common linear algebra functions. This is a port of XNAMath to C++. |
Developing audio and video playback
At some point, you may want to add sound or video playback to your DirectX app.
Topic | Description |
---|---|
Discover the options for adding sound and music playback to your DirectX Windows Store app. |
|
Integrate media into your Windows Store app. |
|
Get an introduction to XAudio2, a powerful sound mixing and playback library. |
|
Browse the Microsoft Media Foundation APIs, which support powerful and flexible video playback and acceleration. |
Windows Store game programming in C++
Are you a game developer? (Please say "yes." If you aren't, that's cool too!)
Topic | Description |
---|---|
Portal page for game development in Windows Store apps. |
|
Port from OpenGL ES 2.0 to Direct3D 11 | Porting guidance for moving your OpenGL ES 2.0 game to a Windows Store game. |
Port from DirectX 9 to Windows Store | Porting guidance for moving your DirectX 9.0 game to a DirectX 11.2 game. |
Add Windows Store features for DirectX 11 games | Learn how to add Windows Store app specific features to your new game! |
Detailed end-to-end C++ DirectX Windows Store game sample that focuses on game code design. |
Publishing and selling DirectX Windows Store apps
Topic | Description |
---|---|
Learn about GDFMaker, ratings, and how to package a game for sale on the Windows Store. | |
Learn about the DirectX feature levels and the platform-specific requirements for DirectX apps. |
|
Package your Windows Store DirectX game | Learn how to package games with large or localized assets for the best Windows Store download experience. |
Publishing Direct3D Windows Store apps to the Windows Store (DirectX and C++) |
Learn about publishing Windows Store apps using DirectX on the Windows Store. |
Review the specific Windows Store policies for Windows Store apps using DirectX. (See Section 3.10) |
|
By selling your app in the Windows Store, you can reach the millions of customers who use Microsoft Windows. |
Working with C++/CX
If you're an old hand with C++ on Windows platforms, things may look just a little bit different. Just a little! Here's some pointers to topics that can help you get a handle on the changes introduced with the Component Extensions (CX) and the task-based async programming model.
Topic | Description |
---|---|
High-level page that links to content related to C++. |
|
Table that provides quick info about Visual C++ component extensions (C++/CX) operators and keywords. |
|
Reference content for the types that are supported by C++/CX. |
|
Reference content for the namespaces that contain C++-specific types that can be used in Windows Store apps. |
Learn about asynchronous and multithreaded programming for DirectX apps and games. |
|
Describes the basic ways to use the task class to consume Windows Runtime asynchronous methods. |
|
Creating Asynchronous Operations in C++ for Windows Store apps |
Describes how to use create_async to produce asynchronous methods. |
Reference documentation for the task class. |
|
In-depth discussion about the task class and how to use it. |
Additional useful libraries for Windows Store app C++ programming
Windows Runtime types play well with Standard Template Library types. Most C++ Windows Store apps use Standard Template Library collections and algorithms, except at the ABI boundary. |
|
PPL provides algorithms and types that simplify task parallelism and data parallelism on the CPU. |
|
C++ AMP provides access to the GPU for general-purpose data parallelism on video cards that support DirectX 11. |