Jump to content
  • Advertisement
Sign in to follow this  
Trillian

Consequences of losing a device?

This topic is 4585 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

Hello! I am programming with Direct3D 9 and I know that I should include something to handle a device lost. But I don't think I've actually ever lost a device! And don't say I didn't try, I've played with minimizing and alt-tabbing. Anyways, I'd like to know the following: 1- Under which circonstances may a direct3D device be lost? 2- What are the direct consequences of losing a device (textures, vertex buffers)? Thanks! EDIT: I think I've actually just lost my device! When A messagebox pops in my game while playing fullscreen, I don't seem to be able to continue playing...

Share this post


Link to post
Share on other sites
Advertisement
1. Don't know.
2. I believe that you lose everything that was created using the device.

Dave

Share this post


Link to post
Share on other sites
Would that mean something like :

- Textures
- Vertex / Index buffers
- ID3DXSprite / ID3DXMesh
- Render states

?

Share this post


Link to post
Share on other sites
Not render states because you don't really create anything with them, you just change a device state.

Dave

Share this post


Link to post
Share on other sites
Games to which I played, when minimized and maximized back, had no problem continuing to work. If the textures and buffers were lost, it should normally take some time before the game loads back every model and so. How do they manage to do this? Do they keep a copy of the data in CPU memory?

Share this post


Link to post
Share on other sites
I don't think they actually lose the device when minimised. I am able to minimise my renderer with no consequences.

Dave

Share this post


Link to post
Share on other sites
hi,

how far I know (I'm working with OGL)
you loose everything not created MANAGED,

btw: have you ever minimized half-life 2 and then returned to
the game, it takes a long time....


Marc

Share this post


Link to post
Share on other sites
If the device was lost when minimised then my textures wouldn't show, but they do. I have no preventative measures in place to reload the textures if a device is lost.

Dave

Share this post


Link to post
Share on other sites
perhaps they are created managed,

when you minimise gothic, and then maximize it back,
you have a short time no textures (some times)

and it uses directx

Share this post


Link to post
Share on other sites
Thanks for all the info, I think I'm going to do like Dave : No preventive measures. This is my first game with direct3D, it's okay if there are some flaws like this, as long as it is playable!

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!