This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center
                            
                        
                    
                
                                7年前关闭。
            
                    
我想获取opengl版本,代码为:

#include "stdafx.h"
#include <GL/glut.h>

void main(int argc, char** argv)
{
    glutInit(&argc,argv);
    glutInitDisplayMode(GLUT_SINGLE|GLUT_RGB);
    glutInitWindowPosition(100,100);
    glutInitWindowSize(400,300);
    glutCreateWindow("OpenGL Version");
    const char* version = (const char*)glGetString(GL_VERSION);
    printf("OpenGL version:%s\n", version);
    glutMainLoop();
}


但是我在glutCreateWindow("OpenGL Version");中遇到错误,谁可以帮助我?

最佳答案

看起来您正在使用Microsoft提供的默认图形驱动程序。要使用OpenGL,您必须安装显卡制造商提供的驱动程序。

09-10 06:44
查看更多