OpenGL报错GLSL 4.60 is not support

2022-12-12  本文已影响0人  寽虎非虫003

报错信息

QOpenGLShader::compile(Fragment): 0:1(10): error: GLSL 4.60 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES

检查

两台电脑都检查了一下OpenGL

glxinfo | grep "OpenGL"

出错的电脑的返回信息如下

OpenGL vendor string: Mesa/X.org
OpenGL renderer string: llvmpipe (LLVM 12.0.0, 256 bits)
OpenGL core profile version string: 4.5 (Core Profile) Mesa 21.2.6
OpenGL core profile shading language version string: 4.50
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.1 Mesa 21.2.6
OpenGL shading language version string: 1.40
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 21.2.6
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

而我原本编写代码的机器如下

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: NVIDIA GeForce GTX 970/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 470.161.03
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6.0 NVIDIA 470.161.03
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 NVIDIA 470.161.03
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

一看,果然是显卡驱动的问题,于是去找显卡驱动,更改为和编写电脑一致。


改显卡驱动

然后电脑重启失败了
最后在tty下面参考Ubuntu安装和卸载CUDA和CUDNN一文,禁用了nouvenu,重装NVIDIA驱动,以及别的文章的方法删除/etc/X11/xorg.conf,可以成功重启了,不知道后者究竟有没有起效。

上一篇下一篇

猜你喜欢

热点阅读