Jump to content
  • Advertisement
Sign in to follow this  
GiantPaul

Losing Device in directx

This topic is 3182 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

When my program is full screen and it loses the device then I know how to bring it up and reload the art. But is there a way to hold onto the device in the first place? My program loses device way too often. Any recommended books on this topic?

Share this post


Link to post
Share on other sites
Advertisement
The only reason you will lose a device in full screen mode is if you switch to windowed mode, something pops up on your desktop (my firewall is bad about that since I use it in non-learning mode) or you alt-tab to the desktop. You should not lose it at any other time. Mind elaborating on when it happens?

Share this post


Link to post
Share on other sites
almost anything running in the background: chat programs... makes it lose the device. Sometimes it loses the device while loading up and worst part is that it then flickers and I can't tab out or minimize it.

Share this post


Link to post
Share on other sites
I would suggest creating a custom CWnd for rendering to. Once thats done, simply do a CWnd->SetFocus() to make it the active screen. This should override most stuff that will cause interference such as MSN, Skype and Yahoo messengers. If you are chatting with someone, don't close the chat window, when it creates a new chat window after being closed, it can make you drop back to the desktop.

Keeping the device, don't believe it's possible with DX. If you try to use the DX device after you have lost the device (besides resetting it or dev->present), DX will go nuts and sometime give you the dreaded BSOD.

One way around some of extensive requirements of reloading resources is to use managed memory when creating your device. DX will take care of most of the resetting, usually only leaving you to reload and initialize any shaders you use.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!