Sorry, you need to enable JavaScript to visit this website.

Primary tabs

Two OpenGL versions showing in Ubuntu 17.04 with intel HD4000

2 posts / 0 new
01 Staff's picture
01 Staff (not verified)

Jul 31, 2017 - 04:02am

  • 01 Staff's picture
    01 Staff (not verified)

    Hi All,

    I have updated my Ubuntu Gnome 17.04 laptop - i5 Dell laptop with a HD4000 GPU - to the latest driver with the intel Update Tool but glxinfo reports the following two OpenGL versions:

    OpenGL 3.3 and GLSL 3.3 as below...
    OpenGL vendor string: Intel Open Source Technology Center
    OpenGL renderer string: Mesa DRI Intel(R) Ivybridge Mobile
    OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.3
    OpenGL core profile shading language version string: 3.30
    OpenGL core profile context flags: (none)
    OpenGL core profile profile mask: core profile
    OpenGL core profile extensions:

    ... and OpenGL 3.0 & GLSL 1.30
    OpenGL version string: 3.0 Mesa 17.0.3
    OpenGL shading language version string: 1.30
    OpenGL context flags: (none)

    I ask because I'm learning OpenGL and shader programming with SDL2 which appears to be creating a OpenGL 3.0 context along with GLSL 1.30.

    That's fine, but... the first entry (OpenGL core profile version string: 3.3 (Core Profile) Mesa 17.0.3) suggests that OpenGL 3.3 with GLSL 3.3 is available?

    Does anyone know why there are two entries for OpenGL (3.0 & 3.3)?


    Jul 31, 2017 - 04:02am
  • xexaxo's picture
    xexaxo (not verified)

    In OpenGL you have what is called Core and Compatibility profiles for the GL context.

    You can read more about them at the Wiki, although in a gist it can be summarised as follows:

    - Core profile, removes support for legacy OpenGL API.


    The tool glxinfo creates two (or more) GL contexts and the versions you see 3.3 and 3.0 correspond to Core and Compatibility, respectively.

    If you want to create a Core profile with SDL2 you need to set the SDL_GL_CONTEXT_PROFILE_MASK attribute to SDL_GL_CONTEXT_PROFILE_CORE.

    A quick search showed the following example.


    Happy hacking!

    Jul 31, 2017 - 10:56am
  • mattrobinson's picture
    mattrobinson (not verified)

    @Emil: Thank you for the explanation, it all makes sense now. ;)

    Jul 31, 2017 - 11:29am