Jump to content
  • Advertisement
Sign in to follow this  
gbook2

Getting video card information

This topic is 3625 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'm writing an OpenGL application on Windows and I'd like to add some video card information to the about dialog. Is there a simple way of getting video card information, like the video card name (ex "NVidia 8800GT"), video ram size, and driver information? I found an example on the MSDN, but it has 7 parts. I'm hoping to find a simpler method. Possibly even display information in a similar way to GPU-z.

Share this post


Link to post
Share on other sites
Advertisement
const GLubyte * vendorString = glGetString(GL_VENDOR);
const GLubyte * rendererString = glGetString(GL_RENDERER);
const GLubyte * versionString = glGetString(GL_VERSION);
const GLubyte * extensionsString = glGetString(GL_EXTENSIONS);


... that is the best you can do with standard OpenGL. However I think if you query Direct3D you can get more information.

Share this post


Link to post
Share on other sites
Perfect! That gives the exact information I'm looking for.

I'm wondering if anyone knows how to get the amount of RAM on the video card?

Share this post


Link to post
Share on other sites
If you don't care about portability, you could use Window's WMI facility. It's a little complicated, but you can get a wealth of information this way. For information about the video card, try the 'Win32_VideoController' table. This project* has an example of taking a WMI table, and stuffing it into a std::map. Pretty handy.


*This is not my code, so I make no presumptions about correctness or licensing.

Share this post


Link to post
Share on other sites
Sign in to follow this  

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