const char *version=(const char *)glGetString(GL_VERSION); printf("%s",version);
以上代码当要检查opengl版本时注意在glfwInit()后和glfwCreateWindow后。否则没有初始化内存出错。 很多时候我们在使用opengl编程时由于版本重多。库也各有不同多数配置不同。在此留档,将会更新此文档。