尽管有新的硬件和软件,为什么我的 OpenGL 版本仍然停留在 3.0?

smw*_*nau 7 xubuntu intel-graphics opengl 16.10

我需要在我的笔记本电脑上使用一个需要 OpenGL 3.3 或更高版本的程序。显然我的“有效”OpenGL 版本是 3.0。以下是 glxinfo 的输出。这是 xubuntu 16.10,显卡是 Intel HD 5500。所以我不明白出了什么问题,似乎硬件和软件都应该是最新的,至少可以达到 3.3。希望有人能帮忙!

glxinfo|grep OpenGL
OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 5500 (Broadwell GT2) 
OpenGL core profile version string: 4.3 (Core Profile) Mesa 12.0.3
OpenGL core profile shading language version string: 4.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 3.0 Mesa 12.0.3
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 12.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:
Run Code Online (Sandbox Code Playgroud)

Cie*_*iek 4

简短的回答:您的 OpenGL 版本没有停留在 3.0。“OpenGL 核心配置文件版本字符串”行将支持的 OpenGL 显示为“4.3”。

更详细的解释:这种复杂的版本控制与 OpenGL 3.0 版本中所做的更改有关,迄今为止所有 OpenGL 版本都完全向后兼容。从 OpenGL 3.0 版开始,某些功能被标记为已弃用,较新的驱动程序不一定必须支持它们才能兼容 OpenGL 3.1+。

为了使 OpenGL 驱动程序能够支持已弃用的功能,同时与 3.1+ 版本完全兼容,OpenGL 引入了“核心”和“兼容”配置文件。

基本上,如果您在“兼容”配置文件的上下文中运行应用程序,则保证您可以访问特定版本之前的所有 OpenGL 功能,包括所有已弃用的功能。在“核心”配置文件上下文中运行应用程序时,情况并非如此。

我的猜测是,对于上下文不感知的应用程序,OpenGL 版本可能会故意报告为 3.0,以获得最大兼容性。这就是环境变量MESA_GL_VERSION_OVERRIDE=4.3派上用场的地方。

欲了解更多信息:OpenGL上下文