Create 3D graphics with DirectX
We show how to use DirectX programming to implement the fundamental concepts of 3D graphics.
Objective: Learn to program a 3D graphics app.
We assume that you are familiar with C++. You also need basic experience with graphics programming concepts.
Total time to complete: 30 minutes.
Here we talk about how to develop 3D graphics with DirectX and C++\Cx by walking through the Direct3D tutorial sample. This sample is a five-part tutorial that introduces you to the Direct3D API and the concepts and code that are also used in many of the other DirectX samples. These parts build upon each other, from configuring DirectX for your Windows Store C++ app to texturing primitives and adding effects.
Note The Direct3D tutorial sample uses a right-handed coordinate system with column vectors. Many DirectX samples and apps use a left-handed coordinate system with row vectors. For a more complete graphics math solution and one that supports a left-handed coordinate system with row vectors, consider using DirectXMath rather than the Direct3D tutorial sample's BasicMath.h APIs. For more info, see Using DirectXMath with Direct3D.
We show you how to:
- Initialize Direct3D interfaces by using the Windows Runtime
- Apply per-vertex shader operations
- Set up the geometry
- Rasterize the scene (flattening the 3D scene to a 2D projection)
- Cull the hidden surfaces
Next we create a Direct3D device, swap chain, and render-target view, and present the rendered image to the display.