Chapter 11. Direct3D Initialization

In this chapter, you finalize the foundation of your rendering engine. You take your first look at the Direct3D C++ API and write an initial Direct3D application. Along the way, you revisit some previously discussed topics, including the DirectX swap chain and depth/stencil buffering.

Initializing Direct3D

You can perform Direct3D initialization through the following steps:

1. Create the Direct3D device and device context interfaces.

2. Check for multisampling support.

3. Create the swap chain.

4. Create a render target view.

5. Create a depth-stencil view.

6. Associate the render target view and depth-stencil view with the output-merger stage of the Direct3D pipeline.

7. Set the viewport.

The next few sections ...

Get Real-Time 3D Rendering with DirectX® and HLSL: A Practical Guide to Graphics Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.