Search code examples
c++directxdirectx-9direct3d9

Direct3D9 Get D3DPRESENT_PARAMETERS From IDirect3DDevice9


Is there a way to retrieve all info that requires to re-build D3DPRESENT_PARAMETERS from a created device?

In Direct3D11 ID3D11DeviceContext saves all this trouble, but how would you go and get all the necessary information to re-construct present parameters?

Thanks in advance!


Solution

  • Call IDirect3DDevice9::GetSwapChain to get an instance of IDirect3DSwapChain9 interface. Then call GetPresentParameters to get that structure.