Partilhar via


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.

How to set up your app to display a view

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.

DirectX Windows Store app samples

Browse for a specific DirectX Windows Store app sample, and get straight into the code!

Developing games

Explore Windows Store game development, from JavaScript to DirectX.

Download Visual Studio 2012

You must have Visual Studio 2013 to create Windows Store apps.

Where is the DirectX SDK?

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

Planning Windows Store apps

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.

Getting started with DirectX game development

Review the core concepts for DirectX game development with Windows 8.

Understanding DirectX Windows store game development

Walk through a complete DirectX Windows Store game sample and learn about the different components you use to construct it.

Creating Windows Runtime Components

When developing a Windows Store app with DirectX and C++, you may need to create and access Windows Runtime components. Review the process here.

Getting started with DirectX graphics

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

XAML overview

What is XAML? Go over the basics of XAML elements and layout.

Quickstart: Creating a user interface with XAML

Discover how to create a basic UI with XAML. This quickstart is not specific to C++.

DirectX and XAML interop

Describes how to integrate DirectX surfaces into XAMLUI elements.

Guidelines for user interaction (DirectX and C++)

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.

Supporting screen orientation (DirectX and C++)

Learn how to support screen rotation behaviors in your Windows Store apps using DirectX with C++.

Windows::UI::CoreWindow API reference

Review the Windows::UI::CoreWindow API type and learn about the basic window infrastructure for Windows Store apps.

Windows::UI::Core namespace reference

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

Windows::UI::Xaml::Controls::SwapChainPanel API reference

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

Windows Runtime core user interface objects and DirectX

Learn basic background information about interoperation between DirectX and the Windows Runtime.

Asynchronous programming (DirectX and C++)

Learn about asynchronous and multithreaded programming for DirectX apps and games.

Creating Windows Runtime Components in C++

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

Working with input and controls in your DirectX game

Take a look at the different input and control options available to Windows Store apps with DirectX.

Responding to user interaction (DirectX and C++)

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.

Guidelines for user interaction (DirectX and C++)

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.

Responding to touch input (DirectX and C++)

Learn how to incorporate touch input in your Windows Store app using DirectX.

Developing mouse controls (DirectX and C++)

Learn about important mouse input considerations in your Windows Store app using DirectX.

Tutorial: adding touch controls to your DirectX game

Learn how to incorporate basic touch controls, such as screen panning, into your Windows Store apps with DirectX.

Tutorial: adding move-look controls to your DirectX game

Learn how to create a basic touch-based "move-look" controller for a 3D Windows Store apps with DirectX.

Adding support for devices

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.

Responding to motion and orientation sensors

Use motion and orientation sensors.

Getting started with XInput

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.

Suspend/resume

Learn how to restore your app to a presentable state after it's closed. This is a must for most apps.

How to activate an app (DirectX and C++)

Walk code that shows how to activate your Windows Store app using DirectX.

How to suspend an app (DirectX and C++)

Walk code that shows how to suspend your Windows Store app using DirectX.

How to resume an app (DirectX and C++)

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

Direct2D quickstart

Jump right in to Direct2D development! Create a 2D app, or use the provided primitives to create your own interface or display overlay.

Creating a simple Direct2D app

Walkthrough the basic structure of a Direct2D desktop app.

Introducing DirectWrite

Learn about DirectWrite and displaying text in DirectX apps.

Getting started with DirectWrite

Follow a quick guide to DirectWrite features.

Programming Guide for Direct2D

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

Getting started with Direct3D

Get started with Direct3D, and Direct3D 11.1 in particular. Note that this is NOT a 3D graphics programming primer.

Direct3D 11.1 features

Learn more about the features available in Direct3D 11.1, and how they can enhance your DirectX Windows Store app.

Programming guide for Direct3D 11

Learn how to develop against the new model and features in Direct3D 11.

Programming guide for HLSL

Learn how to develop HLSL-based shader routines for your DirectX app. Shaders are the core of modern Direct3D visuals.

Programming guide for DXGI

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

Working with audio in your DirectX game

Discover the options for adding sound and music playback to your DirectX Windows Store app.

Quickstart: Video and audio

Integrate media into your Windows Store app.

XAudio2 introduction

Get an introduction to XAudio2, a powerful sound mixing and playback library.

Microsoft Media Foundation SDK

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

Developing games

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!

Understanding Windows Store DirectX game development

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

Windows game publishing requirements

Learn about GDFMaker, ratings, and how to package a game for sale on the Windows Store.

Developing for different DirectX feature levels

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.

Windows Store policy for Direct3D apps

Review the specific Windows Store policies for Windows Store apps using DirectX. (See Section 3.10)

Publish Windows Store apps

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

Visual C++ language reference (C++/CX)

High-level page that links to content related to C++.

Quick Reference (Windows Runtime and Visual C++)

Table that provides quick info about Visual C++ component extensions (C++/CX) operators and keywords.

Type system (C++/CX)

Reference content for the types that are supported by C++/CX.

Namespaces (C++/CX)

Reference content for the namespaces that contain C++-specific types that can be used in Windows Store apps.

 

Asynchronous programming (DirectX and C++)

Learn about asynchronous and multithreaded programming for DirectX apps and games.

Asynchronous programming in C++

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.

task Class (Concurrency Runtime)

Reference documentation for the task class.

Task Parallelism (Concurrency Runtime)

In-depth discussion about the task class and how to use it.

 

Additional useful libraries for Windows Store app C++ programming

C++ Standard Template Library

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.

Parallel Patterns Library

PPL provides algorithms and types that simplify task parallelism and data parallelism on the CPU.

C++ Accelerated Massive Parallelism (C++ AMP)

C++ AMP provides access to the GPU for general-purpose data parallelism on video cards that support DirectX 11.