Good afternoon. In my project, I created a device with the D3D11_CREATE_DEVICE_DEBUG flag, but it still does not display error information. I get error 0x80070057, but the debug flag shows nothing, as if I haven't initialized it.
D3D11CreateDevice(nullptr, DriverTypes[DriverTypeIndex], nullptr, D3D11_CREATE_DEVICE_DEBUG, FeatureLevels, NumFeatureLevels, D3D11_SDK_VERSION, &pD3DDev, &FeatureLevel, &pCtx);
You must have Windows SDK. If you can compile the code, you likely have it.
To view the debug output from the D3D debug runtime, you must run your app with debugger attached.
And not just any debugger. If your app has components written in .NET, visual studio has 2 distinct debuggers, managed and native. Managed debugger doesn’t listen to these
OutputDebugString events, you must run with native debugger attached. If your startup project is .NET, right click on the startup project, Debug tab, check “Enable native code debugging”.
P.S. I wonder why are using an array for driver types? In almost 100% of cases, the only reasonable value to pass there is
User contributions licensed under CC BY-SA 3.0