Search code examples
cdirectx-12direct3d12

Is it possible to make a D3D12 application in C?


I've seen a lot of posts asking if you can make something using D3D11 and C, but not any that ask if you can make an app using D3D12 and C.

I've searched the web for something but haven't really been able to find anything big.


Solution

  • While only C++ is officially supported, most headers are written in C so it should be possible to make an app. Due to lack of documentation, it will be harder than using C++, but not impossible.

    You need C++ for the helper structures and functions in d3dx12.h. These are a major part of the library that makes it easier to develop applications. However, they are just helper classes using the core features of the library. Nothing stops you from using the core features directly.

    Here is a demo project using C: https://github.com/zenny-chen/Use-Direct3D-12-Compute-Shader-in-C-Basic-