Hi,
When I resize my render frame, I resize the swap chain and recreate all my render targets. But as soon as I do it, my render did work anymore, I just got my clear color displayed.
I can't really provide code sample because this is part of a larger project, but here is how I proceed :
- Resize the swapchain
- Recreate the viewport
- For each render targets :
+ Dispose the Texture2D and recreate it with the new size.
+ Dispose and recreate the ShaderResourceView from the Texture2D
+ Dispose and recreate the RenderTargetView from the Texture2D
- For each depth stencil :
+ Dispose the Texture2D and recreate it with the new size.
+ Dispose and recreate the ShaderResourceView from the Texture2D
+ Dispose and recreate the DepthStencilTargetView from the Texture2D
As soon as I do that, my draw aren't displayed anymore.
If I debug the frame, I can't see that all my draw calls correctly occur and pass throught the vertex shader but stop there, pixel shader is not executed (but one is bind correctly). In the pixel history, I just seen :
- Initial
- ClearTargetView
- Final
No Pixel shader stage or depth test stage... I am probably missing something simple but I don't know what..
Thank if someone can help me.