Jump to content
  • Advertisement
Sign in to follow this  
luasitdown

WHY will not D3D program work?

This topic is 4847 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 I switch it and back again,it stop running. When a 3d screensaver run,it will not work. WHY? I need to know why? I wonder what do D3D do when this happen? It is D3D bug or fault?

Share this post


Link to post
Share on other sites
Advertisement
hi,

yes, read that stuff that jflanglois linked for you, and always code dx with the debug runtime, set loglevel to maximum, and look at the debug output when something goes wrong! it helps in most of cases like this!

look here for debugging stuff: Nexe - DX Debugging

kp

Share this post


Link to post
Share on other sites
Your problem is that when a DX window loses focus, the device is lost, along with all the data stored in video memory. The way to fix this is to add either an event handler or check every frame if the device is lost. If so, you must wait iuntil the device is reasy to b reset, then reset it and load all the video objecs (textures and VBs stored on the video card). It shouldn't be too hard to set up.

I know there is an article on MSDN somewhere, but I am too lazy to look for it. Just search for "device lost" or something...

Edit: got a sudden urge of energy. here is an article about it that describes what is going on, but it lacks a bit in the code...

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!