正确安装各种库后,启动 VcXSrv

在运行阶段出现 OpenGL 版本问题

Failed to open GLFW window. If you have an Intel GPU, they are not 3.3 compatible. Try the 2.1 version of the tutorials.

这个错误实际上是因为WSL默认使用的是OpenGL1.4版本,这是因为WSL默认设置的是Indirect Rendering,最高只能支持OpenGL1.4,和我们项目中使用的版本不一致

我们如下操作

export MESA_GL_VERSION_OVERRIDE=3.3
unset LIBGL_ALWAYS_INDIRECT
glxinfo | grep "OpenGL version"

然后运行程序即正常

相关文章:

  • 2022-12-23
  • 2022-01-18
  • 2022-01-07
  • 2022-02-07
  • 2022-02-14
  • 2021-12-27
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
  • 2022-12-23
  • 2021-05-16
  • 2021-11-30
相关资源
相似解决方案