i want to get opengl version,the code is:
#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();
}
but i get the error in glutCreateWindow("OpenGL Version");,who can help me?
It looks like you’re using the default graphics driver provided by Microsoft. To use OpenGL, you have to install drivers provided by your graphics card manufacture.