哪个是正确的 OpenGL 版本

哪个是正确的 OpenGL 版本

我正在尝试运行一个至少需要 OpenGL 着色语言版本 1.4 的软件。当我使用笔记本电脑的 Nvidia 卡时,它可以正常工作,但使用英特尔 GPU 时会崩溃。我正在尝试调试为什么会发生这种情况。目前我认为这与 GLSL 版本(OpenGL 着色语言)有关。这是glxinfo | grep OpenGL我使用 Nvidia 卡运行它时的输出:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GT 730M/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 390.116
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 390.116
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 390.116
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

当我使用 Intel iGPU 运行它时,我得到了

OpenGL vendor string: Intel Open Source Technology Center
OpenGL renderer string: Mesa DRI Intel(R) Haswell Mobile 
OpenGL core profile version string: 4.5 (Core Profile) Mesa 19.2.1
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 19.2.1
OpenGL shading language version string: 1.30
OpenGL context flags: (none)
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 19.2.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
OpenGL ES profile extensions

可能解释我的问题的两者之间的区别是这一行

OpenGL shading language version string: 1.30

而在 Nvidia 上则是:

OpenGL shading language version string: 4.60 NVIDIA

但是为什么这个 GLSL 有 3 个版本?它们代表什么意思?

OpenGL core profile shading language version string: 4.50
OpenGL shading language version string: 1.30
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10

相关内容