Is there an OS independent way to poll TOTAL and/or USED video memory?

178 views Asked by At

I'm looking for a way to poll for total video memory on board a graphics cars / integrated chipset.

I'm aware of WMI assisted polling under Windows, and as far as I understand that information is constructed on every boot by WMI. However, being an optimist, I am looking for a possible OS independent way to poll for total video memory and free or used video memory.

If not possible, what would be the most elegant way to poll for same under Windows, Linux and OSX?

FYI I don't use DirectX under windows, only OpenGL.

1

There are 1 answers

1
Adam Rosenfield On BEST ANSWER

There's no simple cross-platform way to do it. You'll have to either code up a way to do it yourself for each platform, or use a third-party library such as SDL to do it for you. For example, with SDL, you can use video_mem member of the return value from SDL_GetVideoInfo() to get the total video memory available.