获取显卡型号?

2021-12-30 00:00:00 model graphics intel c++ directx

我想知道如何从代码中获取显卡型号/品牌,尤其是从 DirectX 9.0c(从 C++ 代码中).

I was wondering how I can get the graphics card model/brand from code particularly from DirectX 9.0c (from within C++ code).

推荐答案

在运行时,可以查询设备型号和供应商:

At runtime, you can query the device model and vendor:

  • 在 OpenGL 中,使用命令 glGetString(GL_VENDOR) 或 GL_RENDERER 或 GL_VERSION 来获取您想要的信息.

  • In OpenGL, use the command glGetString(GL_VENDOR) or GL_RENDERER or GL_VERSION to get the information you're after.

在 DirectX 9 中,信息似乎在 Microsoft 配置系统中,并从设备数据库中查询.这是本文档的第 3 部分,其中还有示例代码:http://msdn.microsoft.com/en-us/library/bb204848(VS.85).aspx使用相同的系统,您可以获得诸如视频卡的内存数量、驱动程序编号等信息.

In DirectX 9, it appears the info is in the Microsoft config system, and is queried from the device database. It's section 3 of this document, which also has example code: http://msdn.microsoft.com/en-us/library/bb204848(VS.85).aspx Using the same system you can get such information as the amount of ram the video card has, the driver number, etc.

相关文章