-2

I'm studying DirectX 12 and I'm so curious about that.

Somebody help me!

enter code here
  • Take a look at [this thread](https://stackoverflow.com/questions/29719853/directx-c-3d-engine-programming-learn-now-or-wait-for-directx-12) and [this one](https://stackoverflow.com/questions/33986737/new-to-direct3d-programming-11-vs-12/) – Chuck Walbourn Jun 06 '21 at 05:39

1 Answers1

2

TL:DR: If you new to Direct3D, learn DirectX 11 first. It's far more forgiving for newbies. Once you've gotten a handle on DirectX 11, the switch to DirectX 12 should be much easier.

DirectX 11 & DirectX 12 control basically the same kind of hardware (although newer features are only being added to DirectX 12 this point like DirectX Raytracing and DirectX Ultimate hardware feature level), but have much different API programming models.

In short: DirectX 11 and previous DirectX Runtimes hide a lot of the complexities of working with modern hardware and drivers, while DirectX 12 leaves it all up to the application developer to make it work:

  • Work scheduling
  • CPU/GPU synchronization
  • State tracking for resources (i.e. a texture when it's being loaded vs. a texture when it's being used for filtering vs. a texture when it's being used as a render target)
  • Managing shader+state permutations (i.e. immutable pipeline state objects)
  • CPU/GPU programmable shader data sharing (i.e. root signatures)

This makes DirectX 12 an 'expert' API in that it takes a great deal of knowledge to use it correctly, but also means that a well-written DirectX 12 program can avoid a lot of extra work on the CPU that used to be done in the DirectX 11 Runtime 'on your behalf' to make this simpler to use.

The Microsoft Docs porting guide is a 'point-by-point' list of key differences in the API design. You may also find the YouTube channel useful.

The DirectX Tool Kit is available for both DX11 and DX12. They are not identical, but the similarities can be useful to learn 11 and move to 12.

UPDATE: If you are looking to use HLSL Shader Model 6, DirectX Raytracing, DirectML, Mesh & Amplification Shaders, or other DirectX "Ultimate" features you'll need to use DirectX 12. If you are entirely new to graphics programming, I'd strongly recommend starting with DirectX 11, but you can move quickly to DirectX 12 after you understand the basics.

Chuck Walbourn
  • 38,259
  • 2
  • 58
  • 81