c++获取OpenGL版本号的两种方法

#include 
#include "glut.h"
#ifdef method_1
#pragma comment(lib,"glut32.lib")
#else
#include 
#include 
#pragma comment(lib,"opengl32.lib")
#pragma comment(lib,"gdi32.lib")
#pragma comment(lib,"user32.lib")
#endif
int main(int argc, char *argv[])
{
#ifdef method_1
    int wnd = glutCreateWindow("OpenGL Version");
    const GLubyte * name = glGetString(GL_VENDOR);
    const GLubyte * biaoshifu = glGetString(GL_RENDERER);
    const GLubyte * OpenGLVersion = glGetString(GL_VERSION);
    const GLubyte * gluVersion = gluGetString(GLU_VERSION);
    qDebug()<

源码链接: http://download.csdn.net/detail/caoshangpa/9858673

你可能感兴趣的:(Qt)