获取显卡型号?

2023-09-27C/C++开发问题
3

本文介绍了获取显卡型号?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我想知道如何从代码中获取显卡型号/品牌,尤其是从 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.

这篇关于获取显卡型号?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

无法访问 C++ std::set 中对象的非常量成员函数
Unable to access non-const member functions of objects in C++ std::set(无法访问 C++ std::set 中对象的非常量成员函数)...
2024-08-14 C/C++开发问题
17

从 lambda 构造 std::function 参数
Constructing std::function argument from lambda(从 lambda 构造 std::function 参数)...
2024-08-14 C/C++开发问题
25

STL BigInt 类实现
STL BigInt class implementation(STL BigInt 类实现)...
2024-08-14 C/C++开发问题
3

使用 std::atomic 和 std::condition_variable 同步不可靠
Sync is unreliable using std::atomic and std::condition_variable(使用 std::atomic 和 std::condition_variable 同步不可靠)...
2024-08-14 C/C++开发问题
17

在 STL 中将列表元素移动到末尾
Move list element to the end in STL(在 STL 中将列表元素移动到末尾)...
2024-08-14 C/C++开发问题
9

为什么禁止对存储在 STL 容器中的类重载 operator&()?
Why is overloading operatoramp;() prohibited for classes stored in STL containers?(为什么禁止对存储在 STL 容器中的类重载 operatoramp;()?)...
2024-08-14 C/C++开发问题
6