记录一下nvidia开发中遇到的问题
错误信息如下:
WindowGLFW: Failed create window
terminate called after throwing an instance of ‘std::exception’
what(): std::exception
Aborted (core dumped)
解决方法如下:
1.使用下面命令查询opengl版本
glxinfo | grep "OpenGL version"
OpenGL version string: 3.1 Mesa 20.0.8
2.查看代码中设置的版本是否和查询版本对应
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
3.重新运行正常
如果还有其它问题欢迎留言