Thread: Video card memory size

  1. #1
    Registered User
    Join Date
    Jun 2003
    Posts
    91

    Video card memory size

    Can somebody give me an example or link as to how you can get the video card memory size, i know hoe enumerate devices and get say the adaptor make but cant find anything on getting the memory of the card.

    thanks

  2. #2
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    You'll have to query the driver and read the information in the structure.

  3. #3
    Registered User
    Join Date
    Jun 2003
    Posts
    91
    how about,

    IDirect3DDevice9::GetAvailableTextureMem

    i cant even find a a working example of how to use this. i know its not that acurate but still want to have a go.

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Code:
    UINT dwEstimatedVideoMem=Device->GetAvailableTextureMem();
    For something more precise you will probably need to retrieve the adapter ordinal number from D3D and then use a Win32 API call to find out the total memory and/or total memory left on the card. Windows has this information and you can query for it.

    A quick and dirty method would be to call this prior to using any memory and then after you are done loading everything. Compare them and you have an idea of the size of your data. Again it's not precise.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Blackjack
    By Tommo in forum C Programming
    Replies: 10
    Last Post: 06-20-2007, 08:07 PM
  2. How can I access a struct (from a header file)?
    By loxslay in forum C++ Programming
    Replies: 3
    Last Post: 10-07-2006, 01:25 PM
  3. Confused about Memory
    By gL_nEwB in forum C++ Programming
    Replies: 22
    Last Post: 06-20-2006, 07:32 PM
  4. Pointer's
    By xlordt in forum C Programming
    Replies: 13
    Last Post: 10-14-2003, 02:15 PM
  5. Is it necessary to write a specific memory manager ?
    By Morglum in forum Game Programming
    Replies: 18
    Last Post: 07-01-2002, 01:41 PM