Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.

steve coward

Help! How to debug video memory issue?

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

I am seeing some weird behavior in my application that I have been developing. As I create my direct draw surfaces from bitmap files during initialization, the rendering of certain buttons in my MSVC++ program and on my task bar turn solid orange, which is the background color of my sprites. It happens upon executing this code: if ((hr = pdds->GetDC(&hdc)) == DD_OK) { StretchBlt(hdc, 0, 0, ddsd.dwWidth, ddsd.dwHeight, hdcImage, x, y, dx, dy, SRCCOPY); pdds->ReleaseDC(hdc); } I check available video memory querying DDCAPS structure and it reports that I still have 5 Mb of original 32 Mb free after all bit maps have been loaded. My program runs in Windows mode and is a 2D iso based rts game using direct draw. Changing the order that the bitmaps are loaded causes the color anomaly to occur duiring a different bitmap load. Reducing the number or size of bitmaps loaded eliminates the behavior (but remember that even when all bitmaps are loaded DDCAPS structure claims significant amount of free video memory exists). Also as I play with my program after initialization and loading in a game map, simply panning around the map seems to cause certain data structures within my game database to quietly become corrupted. I am using many small CRgns for various purposes. Hit testing using these CRgns changes as I pan around the screen. I am not sure if this is related to the previous issue. I assume it is because both problems seem to have appeared at the same time. All of this code was working fine very recently. I added a second hard drive to my computer a few days ago and I think my program was not displaying this problem prior to that. Could this somehow be the source of my problem? Does anyone have any idea how I can debug this problem - or better yet, does anybody know what is wrong? thanks in advance for any advice you are willing to give me, steve coward

Share this post

Link to post
Share on other sites

  • 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!