为什么MESA不会让我使用OpenGL 4.5(或3.0以外的任何东西)?

时间:2017-04-07 22:52:06

标签: opengl mesa

我安装了最新版本的MESA(17.0.3),这应该允许我使用高于3.0的OpenGL(对吗?)

问题:我被困在3.0版本。 (并且我的意思是我不知道如何让MESA使用更高的版本,或者即使我可以)我知道我的电脑(Chromebook运行crouton for linux)具有OpenGL 4.5功能...但我也知道关于MESA没什么:\。

我知道您可以使用glxinfo获取有关OpenGL的信息,所以这是我目前可以提供的最佳信息。

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) HD Graphics 400 (Braswell) 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.3
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.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 17.0.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions:

提前致谢,感谢任何帮助:)

此外,对于奖励分数,如果有人知道什么是核心资料版本'是的,我很想知道:)

1 个答案:

答案 0 :(得分:3)

请注意,版本字符串出现三次(我们忽略着色语言版本字符串):

OpenGL core profile version string: 4.5 (Core Profile) Mesa 17.0.3
...
OpenGL version string: 3.0 Mesa 17.0.3
...
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 17.0.3

因此,如果您创建核心上下文,则获得4.5。如果您创建非核心(兼容性)上下文,则获得3.0。如果您创建ES上下文,则会获得3.1。

因此,如果您想使用OpenGL 4.5,您必须请求核心上下文。兼容性上下文是默认值。有关如何创建核心上下文的信息将在用于创建OpenGL上下文(GLFW,SDL或其他)的任何API的文档中。

(非Mesa)供应商驱动程序的行为方式不同,即使您选择兼容性上下文,它们也会使最新版本可用。但是,Mesa和macOS驱动程序只会为您提供更新的核心上下文版本。