locked
Suspending a D3D app

    Question

  • My Metro app downloads realtime data and displays it with D3D. It creates fairly large textures (~one megapixel) for that data and caches it for animating. I'm confused about how my app should behave when suspended:

    1. If animating the data when suspending, should it automatically stop animating when suspending?

    2. Should it delete those cached textures?

    3. Should it also release the D3D device?

    So far I've been focussed on getting and displaying the data but now need to look into the app lifecycle behavior. I'm not sure how the lifecycle applies to my realtime app. In my existing desktop apps I clean up everything on exit (clean debug D3D exit). For Metro, it seems like I should only do item #1 above and let Windows clean up the rest of the mess if it decides to terminate the app. If I do a significant amount of cleanup on suspension then I would need to do a bunch of reconstruction at resume time, even if the user only momentarily switched away from my app. Obviously, if the app is suspended for a significant amount of time, it would need to invalidate alot of its realtime data since it would be stale ... but I see that as a completely separate issue.

    What are the official MSFT guidelines on suspension of a D3D Metro app? I've read the regular Guidelines page but it doesn't say anything about D3D resources.

    Thanks

    Sunday, August 19, 2012 3:40 PM

Answers