If I then attempt to resize the window, D3D11SwapChain::ResizeBackBuffer @ swapChain_->ResizeBuffers will throw with 'failed to resize DXGI swap-chain buffers'.
That is due to the command buffer swap. If I add a 'hacky fix' at the end of the above code, it works fine:
I ran into a crash when resizing the window. After some debugging I figured out it was because I was using multiple CommandBuffers.
I took the code from the ImGui Example. And added it to the PBR example.
The resulting code would look like this:
If I then attempt to resize the window,
D3D11SwapChain::ResizeBackBuffer
@swapChain_->ResizeBuffers
will throw with 'failed to resize DXGI swap-chain buffers'.That is due to the command buffer swap. If I add a 'hacky fix' at the end of the above code, it works fine:
This forces the state to reset to the deferred command list, which now makes it possible to release the internal references to the backbuffer.