Alt+Tabbing fullscreen D3D

Started by
3 comments, last by 3dModelMan 22 years, 8 months ago
It''s an age old question! Just how much work should I do to make my app alt+tab proof? My texture manager is now capable of restoring, and reloading any lost textures, and I check that the primary surface, the back buffer and the z-buffer are not lost at the beginning of every frame, yet I still haven''t cracked it. The program doesn''t crash, but I just get a black screen when I return to it. I''ll go and experiment with it for a while, but any help in the meantime would be much appreciated. Cheers Matt
Advertisement
I had the same problem, you need to use ->reset to restore the screen. If the app returns in a different video mode, you will get a black screen and D3DERR_NOT_RESET errors from your draw and flip functions. Refer to the Donuts3D sample app within the SDK to see how ->Reset should be implemented.

  Downloads:  ZeroOne Realm

  Downloads:  ZeroOne Realm

find more info in the DirectX SDK on:

IDirect3DDevice8::TestCooperativeLevel()

and

IDirect3DDevice8::Reset();
And after a succesfull Reset() call remember to set render states. Otherwise it''ll still show you black screen.
Ok, thanks. I''ll try Reset().

I tried implementing a WaitMessage loop, and testing the coop level, but for some strange reason it returns DDER_NOEXCLUSIVEMODE 3 or 4 times before continuing.

Thanks again!

- Matt

This topic is closed to new replies.

Advertisement