Jump to content
  • Advertisement
Sign in to follow this  
rajivtm

Image Corruption?

This topic is 5136 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'm making a game with C# and DirectX 9. The game is working very well except for that after about a minute of playing, the bitmaps on the screen all go crazy. I don't even know how to explain the craziness.... they just get fuzzy and unreadable like they were corrupted or something. Does anyone know what might be the problem? Thanks for any help on this one, Rajiv

Share this post


Link to post
Share on other sites
Advertisement
Can you get a screenshot?

Sometimes if you display surfaces that haven't been initialized, you get some crazy looking results (bits and pieces of other images in memory, for example). Or blitting off screen (improper clipping) can do strange things.

Don't know why it would be happening to you in the middle of the game, though. Does the game state somehow change?


Ryan

Share this post


Link to post
Share on other sites
Nope, I just do a TargetSurface.DrawFast each frame. If I do a check for if(bitmapSurface.IsLost || TargetSurface.IsLost) and throw an exception, it gets thrown immediately when the game starts. But the bitmap distortions don't occur until about a minute into the game.

Share this post


Link to post
Share on other sites
What pool do you assign your surfaces and textures to?
If you use Pool.Default you will have to call Device.TestCooperativeLevel() each frame and reset the device and re-create all default-pool resources in case of a lost device in order to avoid such problems.

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!