将 OpenGL 从 3.0 版更新到最新的 4.5 版

Emi*_*iev 6 graphics intel-graphics opengl mesa drivers

我正在尝试将我的 OpenGL 驱动程序更新到最新版本。我尝试了以下ppas:

ppa:oibaf/graphics-drivers
ppa:eek:ibaf/graphics-drivers
ppa:ubuntu-x-swat/updates
Run Code Online (Sandbox Code Playgroud)

到目前为止没有任何效果。有什么解决办法吗?

glxinfo 的输出 | 格雷普 OpenGL

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 405 (Braswell) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.2.0-devel - padoka PPA
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.0 Mesa 17.2.0-devel - padoka PPA
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.2.0-devel - padoka PPA
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
Run Code Online (Sandbox Code Playgroud)

小智 1

我拥有一台配备 Intel(R) HD Graphics 520 (Skylake GT2) 的笔记本电脑。我遇到了同样的问题,无法使用给定的解决方案解决。所以,我尝试做以下事情,它有所帮助。

运行命令时:

glxinfo|grep OpenGL
Run Code Online (Sandbox Code Playgroud)

您将获得core profile version string输出,这将决定您可以限制 opengl 版本的最大值。对我来说是 4.5,所以接下来我运行了以下命令:

export MESA_GL_VERSION_OVERRIDE=4.5
Run Code Online (Sandbox Code Playgroud)

你可以在你可用的范围内编写你需要的版本。发布此内容后,您可以使用以下命令检查更新的版本:

glxinfo | grep "OpenGL version"
Run Code Online (Sandbox Code Playgroud)

一旦您看到您的版本已更改,您可以使用以下命令将其导出到 bashrc 中:

echo 'export MESA_GL_VERSION_OVERRIDE=4.5' >> ~/.bashrc
Run Code Online (Sandbox Code Playgroud)


soh*_*ham 0

老问题,但如果有人偶然发现这个问题,就会回答。

我的 Ubuntu 16.04 内核为 4.4。我遇到glxinfo 显示错误版本的问题。大多数时候,OpenGL 版本显示为 3.3。我必须将内核更新到 4.15,问题得到解决。我运行了以下命令:

sudo apt-get install --install-recommends linux-generic-hwe-16.04
Run Code Online (Sandbox Code Playgroud)

重新启动系统,现在我有OpenGL 4.5:

server glx version string: 1.4
client glx version string: 1.4
GLX version: 1.4
    Max core profile version: 4.5
    Max compat profile version: 3.0
    Max GLES1 profile version: 1.1
    Max GLES[23] profile version: 3.1
OpenGL core profile version string: 4.5 (Core Profile) Mesa 18.0.5
OpenGL core profile shading language version string: 4.50
OpenGL version string: 3.0 Mesa 18.0.5
OpenGL shading language version string: 1.30
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 18.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
Run Code Online (Sandbox Code Playgroud)