microsoft / DirectXTK12

The DirectX Tool Kit (aka DirectXTK12) is a collection of helper classes for writing DirectX 12 code in C++
https://walbourn.github.io/directx-tool-kit-for-directx-12/
MIT License
1.45k stars 369 forks source link

Add use of C++11 inline namespaces #136

Closed walbourn closed 1 year ago

walbourn commented 1 year ago

This adds use of C++11 inline namespaces to wrap types that have DirectX Tool Kit for DX11 equivalents with the same name. This would allow for 'mixed' use of the DirectX Tool Kit for DX11 and DirectX Tool Kit for DX12 in the same exe without link-time conflicts. This also requires making sure there is only one set of the 'shared' code modules like GamePad, etc. which is supported via a CMake build option BUILD_MIXED_DX11=ON

It has no client-code impacts, although all client code would need rebuilt to link against a static library build with these changes.