【DirectX 12】在Win10 10074上开启DirectX 12的调试功能

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/tomicyo/article/details/44724963

安装Graphics Tools


install graphics tools

创建可调试的DirectX 12程序



#if defined(_DEBUG)
    {
        ComPtr<ID3D12Debug> debugController;
        ThrowIfFailed(D3D12GetDebugInterface(IID_PPV_ARGS(&debugController)));
        debugController->EnableDebugLayer();
    }
#endif

HRESULT hr =
                D3D12CreateDevice (
                NULL,                                           /** Use the Default DXGI Adapter **/
                D3D_FEATURE_LEVEL_11_0,
                __uuidof(ID3D12Device),
                reinterpret_cast<void**>(mDevice.GetInitReference ()));

猜你喜欢

转载自blog.csdn.net/tomicyo/article/details/44724963