• Advertisement
Sign in to follow this  

Image Corruption?

This topic is 4866 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
Actually, I think it gets paged out of memory. I don't know how to fix that though. Any ideas?

Rajiv

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
I don't specifically assign them to a pool. Does it automatically put them in Pool.Default?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement