Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/windows/16.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows 如何检查用户是否在C+中使用NVIDIA或AMD+;_Windows_C++ Cli - Fatal编程技术网

Windows 如何检查用户是否在C+中使用NVIDIA或AMD+;

Windows 如何检查用户是否在C+中使用NVIDIA或AMD+;,windows,c++-cli,Windows,C++ Cli,我需要一种方法来检查这个。我知道如何在C#中做到这一点: 但是,我们如何在C++中实现这一点?,可以使用OpenGL API的代码> GLGETSHIPE(GLYVIEW)方法来获取所需的信息。 下面是一个示例用法 #include <stdio.h> #include <GL/gl.h> #include <GL/freeglut.h> int main(int argc, char **argv) { glutInit(&argc, argv)

我需要一种方法来检查这个。我知道如何在C#中做到这一点:


<>但是,我们如何在C++中实现这一点?

,可以使用OpenGL API的代码> GLGETSHIPE(GLYVIEW)方法来获取所需的信息。 下面是一个示例用法

#include <stdio.h>
#include <GL/gl.h>
#include <GL/freeglut.h>
int main(int argc, char **argv)
{
 glutInit(&argc, argv); // creates opengl context
 glutInitContextVersion(4, 4); // this is the version that works for me
 glutCreateWindow("Test");
 const GLubyte *vendor = glGetString( GL_VENDOR ); // returns the Vendor of Card
 const GLubyte *version = glGetString( GL_VERSION ); // returns the version of the Card
}
#包括
#包括
#包括
int main(int argc,字符**argv)
{
glutInit(&argc,argv);//创建opengl上下文
glutInitContextVersion(4,4);//这是适合我的版本
测试窗口(“测试”);
const GLubyte*vendor=glGetString(GL_vendor);//返回卡的供应商
const GLubyte*version=glGetString(GL_version);//返回卡的版本
}
你可以阅读更多关于它的内容