Best practices for Alt-Tab support in a DirectX app?

前端 未结 4 1408
醉话见心
醉话见心 2021-01-30 10:54

When writing DirectX applications, obviously it\'s desirable to support the user suspending the application via Alt-Tab in a way that\'s fast and e

4条回答
  •  [愿得一人]
    2021-01-30 11:31

    We solved it by not using a fullscreen DirectX device at all - instead we used a full-screen window with the top-most flag to make it hide the task bar. If you Alt-Tab out of that, you can remove the flag and minimize the window. The texture resources are kept alive by the window.

    However, this approach doesn't handle the device lost event happening due to 'lock screen', Ctrl+Alt+Delete, remote desktop connections, user switching or similar. But those don't need to be handled extremely fast or efficiently (at least that was the case in our application)

提交回复
热议问题