IDXGIFactory2::CreateSwapChainForHwnd 创建交换链时,返回0x887A0001错误,也就是DXGI_ERROR_INVALID_CALL,查了下,原来是一个窗口句柄只能绑定一个flip显示模型交换链。附上MSDN上的解释:
Because you can associate only one flip presentation model swap chain at a time with an HWND, the Microsoft Direct3D 11 policy of deferring the destruction of objects can cause problems if you attempt to destroy a flip presentation model swap chain and replace it with another swap chain. For more info about this situation, see Deferred Destruction Issues with Flip Presentation Swap Chains.
文章评论