问题描述
我想知道如何从代码中获取显卡型号/品牌,尤其是从 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.
这篇关于获取显卡型号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!