1. Say Hello to DirectX 11.1

This chapter is about DirectX 11.1. Before learning about programming with the new component extension (C++/CX) of Microsoft and DirectX 11.1, it seems necessary to take a step backward and commence with the new features of DirectX 11.1 on a Metro Style application to discover why we must move to the newer version.

This chapter covers the following:

  • The need for DirectX 11.1
  • The prerequisites
  • Introduction to C++ component extensions (C++/CX)
  • Metro Style apps
  • Setting up your first project
  • Building your first Metro app
  • Working with game time
  • Initializing the device

2. Getting Started with HLSL

This chapter is about HLSL, the GPU programming language for DirectX, which is a high-level shader language that is used to generate shaders. This chapter covers the following topics:

  • An introduction to HLSL
  • New features of HLSL
  • Compiling and linking to shaders
  • Buffers in Direct3D
  • Rendering primitives
  • Direct2D 1.1

3. Rendering a 3D Scene

This may be the most favorable chapter in this book. We are going to lay out the process of developing our framework in order to render 3D scenes. We’re going to take you on a tour of some of the advanced concepts of the 3D programming, specifically focusing on system usages, loading and rendering meshes, handling inputs, types of cameras, and finally integrating XAML and Direct3D in order to have an editor for the game.

This chapter covers the following:

  • Displaying the performance data
  • Asynchronous resource loading
  • Getting started with the Model Editor
  • Loading a model from the .cmo format
  • Rendering a model
  • The input devices we’ll need
  • Keyboard
  • Pointer
  • Xbox 360 controllers
  • Turning on the camera
  • Base camera
  • First person camera
  • Third person camera
  • Composing XAML and Direct3D

4. Tessellation

You’ve already probably heard a lot about tessellation with the new features that were available on DirectX 11. In this chapter, we are going to kill two birds with one stone. First, we are going to look at some examples on which to perform tessellation step- by-step and we will take a look at the significant changes made to 3D applications by tessellation. Then, we will outline how to use the Graphics Debugging feature in Visual Studio 2012.

This chapter covers the following:

  • What is hardware tessellation?
  • Basic tessellation
  • Displacement mapping with tessellation
  • DirectX graphics diagnostics

5. Multithreading

Today, most computers possess multiple cores within their processors. The CPU and GPU core counts will continue to increase, and in a few years, many applications and tools will be developed to utilize these hardware improvements efficiently. In this chapter, we are going to demonstrate how to improve the framework for a parallel game engine using the new technology of Microsoft, which is called C++ Amp. We are also going to integrate our engine to use Compute Shaders and then compare their performances.

This chapter covers the following:

  • C++ AMP
  • Compute Shaders
  • Compute Shader versus C++ AMP
  • Post-processing

DirectX 11.1 Game Programming