Resizing Render Target Direct2D after WM_SIZE

前端 未结 1 464
庸人自扰
庸人自扰 2021-01-23 23:59

Quick question guys... I am currently working with Directx3D and 2D and I was wondering if I have to recreate the render target when the Windows is resized or does Direct2D auto

相关标签:
1条回答
  • 2021-01-24 00:25

    See Care_and_Feeding_of_the_Swap_Chain and Handling_Window_Resizing

    Quote1: Naturally, the application's best route is to respond to WM_SIZE, and call IDXGISwapChain::ResizeBuffers, passing the size contained in the message's parameters.

    Quote2: Before you call ResizeBuffers, you must release all outstanding references to the swap chain's buffers. The object that typically holds a reference to a swap chain's buffer is a render-target-view.

    0 讨论(0)
提交回复
热议问题