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

前端 未结 4 1416
醉话见心
醉话见心 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:26

    In DX8 and 9 (and 10?) if you create your resources (vertex and index buffers and textures mainly) using D3DPOOL_MANAGED they will persist across lost devices and will not need reloading. This is because they are stored in system memory and the DX runtime copies to video memory automatically. However there is a performance cost due to the copying and this is not recommended for rapidly changing vertex data. Of course you would profile first to determine if there is a speed issue :-)

提交回复
热议问题