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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.