OpenGL on Linux with Mesa 12.0.3 GLSL 3.30 Not Supported

This question already has an answer here:

  • Core profile vs version string? Only getting GLSL 1.3/OGL 3.0 in mesa 10.0.1 1 answer

  • 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.

    链接地址: http://www.djcxy.com/p/38524.html

    上一篇: Qt 5.6.3没有选择正确的渲染模式

    下一篇: Linux上的OpenGL与Mesa 12.0.3不支持GLSL 3.30