Skip to main content
GameDev.net gamedev.net
🔒 Locked

How can I get the video memory size?

Started by andue May 3, 2005 at 1:02 PM 1 replies 1.5k views
Original Post
andue
andue
Hello everybody! How can I get my computer's video memory use DirectX functions? Thank u all!
jollyjeffers
jollyjeffers
You can't really get the number you're expecting - say 64mb/128mb/256mb.

You can query how much available video memory you have, but it'll probably be substantially higher than you expect as it includes AGP/RAM as well as VRAM. Which is actually the correct value.

To my knowledge, the only way to get the quantity of onboard VRAM is to directly query the device drivers - which is neither easy nor reliable. You used to be able to drop back to the DirectDraw7 interfaces and query it that way, but I read a few posts by people that said it still gave "odd" results on some drivers...

IDirect3DDevice9::GetAvailableTextureMem( )

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
circlesoft
circlesoft
While building with the debug runtime, you can create a RESOURCEMANAGE query and find a lot more information pertaining to memory use. Check into creating an IDirect3DQuery9 with D3DQUERYTYPE_RESOURCEMANAGER and the D3DEVINFO_RESOURCEMANAGER structure. This Queries page on MSDN may be helpful.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.