Jump to content
  • Advertisement

Archived

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

Memory?

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

Advertisement
in directdraw:

memset(&ddsCaps, 0, sizeof(ddsCaps));
ddsCaps.dwCaps = DDSCAPS_TEXTURE | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM;
lpdd->GetAvailableVidMem(&ddsCaps, NULL, &dwNewFree);
dwAllocMem = dwFree - dwNewFree;

Log("Free video memory: %u (Alloc: %u)", dwNewFree, dwAllocMem );



ddsCaps is a caps structure, lpdd is a direct draw device.

probobly reletivly the same way in direct3D... hardware caps!

Share this post


Link to post
Share on other sites
quote:
Original post by Dean Harding
Don''t rely on that giving you accurate information. In general you shouldn''t rely on any such functions in your algorithms.


Don''t worry. I just want to use it for statistical feedback so the user has some idea of how much memory is still available before loading additional data.

Thanks for the pointer, AfTeRmAtH!

Share this post


Link to post
Share on other sites
quote:
Original post by Dean Harding
Don''t rely on that giving you accurate information. In general you shouldn''t rely on any such functions in your algorithms.

If I had my way, I''d have all of you shot!


codeka.com - Just click it.


Would you like to tell us an algorithm that you can rely on to get that sort of information?

Share this post


Link to post
Share on other sites
quote:
Original post by AfTeRmAtH
Would you like to tell us an algorithm that you can rely on to get that sort of information?




I think he''s trying to say using the amount of available video mem for anything besides logging purposes is bad. I''d have to agree.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!