What's involved in resetting the graphics device?

Posted by Donutz on Game Development See other posts from Game Development or by Donutz
Published on 2013-05-02T16:00:50Z Indexed on 2013/07/02 23:19 UTC
Read the original article Hit count: 155

Filed under:
|
|
|

I'm playing with XNA 4.0, VS2010. I've created a window (not maximized) and drawn some sprites. All is good until I resize the window, after which the sprites stop displaying or only partially display. I'm pretty sure it has something to do with needing to reset the device or something, but can't find any clear instructions or sample code. It's not just a case of needing to increase the preferredbackbuffer size, because even if I shrink the window I get this symptom. I've looked at the source code that I was able to get from Microsoft before they shut down XNA, but it doesn't actually explain anything.

Any help or advice?

If it makes any difference I'm creating DrawableGameComponents and doing my updates and drawing in their Draw/Update routines.

© Game Development or respective owner

Related posts about c#

Related posts about 2d