OpenGL on Linux with Mesa 12.0.3 GLSL 3.30 Not Supported
This question already has an answer here:
You must request an OpenGL core context.
With the current version of Mesa, if you do not request a core context, you get an OpenGL 3.0 compatibility context. If you do request a core context, you get an OpenGL 3.3 core context (or possibly newer) and you can use GLSL 3.30.
Similar behavior applies to OpenGL on macOS, except you get either 3.3 or 4.1 core contexts, and you get a 2.1 context otherwise.
See LWJGL Version Selection:
ContextAttribs contextAtrributes = new ContextAttribs(3, 2)
.withProfileCore(true);
Please ignore the wiki's suggestion to use withForwardCompatible()
, that functionality is somewhat obsolete.
上一篇: Qt 5.6.3没有选择正确的渲染模式