Getting started with DirectX 11

(mainly gathering resources for learning)

It can be tough to find up to date DirectX 11 tutorials, guides or series for beginners out there. Here I gather links, YouTube playlist or articles to start your journey with DirectX API and graphics programing.

First you should know that DirectX 11 is the equivalent of OpenGL 4, and DirectX 12 of Vulkan. It is recommended to learn DirectX 11 / OpenGL 4 first. If you need more control and performance then DirectX 12 / Vulkan will provide a low level API designed for experts that already master DX11/GL4. Items that I recommend the most to start learning are emphasis in orange.

Porting

In the past DirectX development would require the DirectX SDK you would typically use the header "d3dx11.h" and functions like D3DX11xxxxx() or D3DX10xxxx(). The SDK is now deprecated and the DirectX API now available through the Windows Development Kit that comes when installing Visual Studio. In this version you will rely on "d3d11.h" and D3D11xxx() functions. Unfortunately during this change many features have been removed (such as texture creation, or shader program handling). Therefore you need to rely on other libraries to find functions equivalent to the old SDK. (source) Mainly, you need the DirectX Tool Kit. But this is also true for the obsolete "xnamath.h" math library now replaced by "directxmath.h" (migration from the xna math library). Here is a list of other equivalences and other necessary libraries: walbourn.github.io/living-without-d3dx/

A lot of old DirectX11 code and tutorial out there will need some porting as they rely on the deprecated DirectX SDK. Here is an example of such porting from the old SDK to the modern Windows SDK and DirectX Tool Kit etc:

www.asawicki.info/news_1604_adventures_with_porting_code_to_visual_studio_2015_and_no_directx_sdk

You can install the tool kit with NuGet or compile it from source (Compilation is relatively easy):

github.com/microsoft/DirectXTK/wiki/Adding-the-DirectX-Tool-Kit

Tutorial to the DirectX ToolKit (although I would recommend starting from a tutorial series using the toolkit first before reading this): github.com/Microsoft/DirectXTK/wiki/Getting-Started

Web Resources

Window setup:

Complete series:

(Youtube playlists)

(Articles)

Other code samples

Books

- Direct3D succinctly | Chris Rose | 2014
Free ebook. For Win 8 and Visual Studio 2012.

- Introduction to 3D Game Programming with DirectX 11 | Franck Luna | 2012
Most cited book by the community, considered to be the reference. Unfortunately it is quite old and code may not work on modern systems such as windows 10 / visual studio 2019 it also uses the obsolete Effects framework. However, there is a bit more up to date code and erratum in the companion site www.d3dcoder.net with fix for visual studio 2015. There is also a git compiling every examples in the book and is a bit more up to date.

- Real-Time 3D Rendering with DirectX and HLSL | Varcholik P. | 2014
The book relies on outdated tools and does not show the entire code of each sample, however, the companion site provides up to date code sample for visual studio 2019.

- Practical Rendering Computation Direct3D 11 |2011

- HLSL Dev cookbook |Doron-Feinstein | 2013

Official Documentation

Direct3D tutorial msdn (Documentation in the Readme.docx) (based on the obsolete SDK) (an OO port)

DX11 Programming Guide
DX11 API Reference

Compute Shader / DirectCompute

Documentations

List of links:

DirectX12

WIP

https://devblogs.microsoft.com/directx/useful-links/
https://nikitablack.github.io/post/directx_12_by_example/
https://digitalerr0r.net/2015/08/19/quickstart-directx-12-programming/
https://www.3dgep.com/learning-directx-12-1/
https://docs.microsoft.com/en-us/windows/win32/direct3d12/directx-12-programming-guide

No comments

All html tags except <b> and <i> will be removed from your comment. You can make links by just typing the url or mail-address.
Anti-spam question: